Originally Posted by
MacGyver
You can't initialize a variable inside a struct.
agreed but how do i initialize it? i tried
Code:
char *index[INDEXSIZE];
inside the struct body while trying to initialize outside with this:
Code:
st1.index[]={"debug","itterations","population",
"no fix vehicles","pm","pc"};
but i get the following message
Code:
teststring.c:25: error: expected expression before ‘]’ token
i tried several alternatives (changing the array size declaration, leaving it flexible etc) but i get the above message or something alternative with "{" . i know something is wrong with the expression i use but i can't figure out what...