Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

simple array question

37 views
Skip to first unread message

jaco...@gmail.com

unread,
Jan 18, 2013, 1:43:33 AM1/18/13
to
this array creation and assignment does not work on xcode on mac (latest download). However, this array creation and assignment works just fine on visual studio. what am missing? is it a configuration issue? I know that the array initializes. if i remark out the assignment line the file will compile and i can read the array. I don't understand why the assignment line is not recognized as the already defined array.

int myarr[20];
myarr[1]=9;

the IDE claims the following:
Semantic Issue: type specifier missing defaults to int
Semantic Issue: Redefinition of 'myarr' with a different type

jaco...@gmail.com

unread,
Jan 18, 2013, 10:54:32 AM1/18/13
to
found the answer. my error. i was not statement setting a value for the array was outside of the main. Problem solved. C works the way it is supposed to.
thanks
0 new messages