Gah, I am not surprised I figured out the problem 5 minutes I send it to the
list.

Though, to create some discussion on the list, I will ask this:

Why cannot we define like so:
void blah(char token[][])
but:
void blah(char token[][size])?

Enlighten me! :D



Quoting [EMAIL PROTECTED]:

>
>
> So, I am trying to pass a 2D char variable to a function and then do some
> stuff
> with it. However, I am receiving this error and I am not quite sure why:
>
> "arithmetic on pointer to an incomplete type"
>
> Poking around the internet hasn't lead me to anywhere interesting. I thought
> it
> was just my compiler on the linux box so I wrote a test program in dev-c++ so
> we can see if that was so. This is written and is compiled in C:
>
> void blah(char token[][]);
>
> int main()
> {
>         char token[1][1];
>
>         token[0][0] = 'c';
>
>         blah(token);
>
>         return 0;
> }
>
> void blah(char token[][])
> {
>                     printf("token: %c\n", token[0][0]);
> }
>
> It generates the same error.
>
> I am assuming, as usual, that it is something obvious and after spending
> hours
> (a good 4 hours straight) smashing my keyboard my eyes have gone out of
> control!
>
> Thank you!
>
>
> ----------------------------------------------------------------
> This message was sent using IMP, the Internet Messaging Program.
>




----------------------------------------------------------------
This message was sent using IMP, the Internet Messaging Program.
-- 
ROM mailing list
[email protected]
Unsubscribe here ->>> http://www.rom.org/cgi-bin/mailman/listinfo/rom

Reply via email to