Programmer Question
i have this struct:
#define sbuffer 128
#define xbuffer 1024
typedef struct{
char name[sbuffer];
char att[sbuffer];
char type[sbuffer];
int noOfVal;
int ints[xbuffer];
double doubles[xbuffer];
char *strings[xbuffer];
} variable;
i need to make an array from this struct, i did this
variable *vars[512]; //is it right
if i want to put a string i had in s into the name,, i did this:
char *s = "What Ever";
strcpy(vars[0]->name,s);
but this is not work,, any help ???
Find the answer here
No comments:
Post a Comment