<$BlogRSDUrl$>

Saturday, 29 April 2006

C assignment problem and explanation 

Question:
<Insert some problem description of something not working>
The value refers to the invalid using of "*(array)++;"
However, if i follow the lab05 exercise, which was using "*array++", it didn't prompt the above error but i can't increment the array's value.

Answer:
*(array)++;

is equivalent to:

*((array)++);

which is kinda equivalent to:

*pointer;

Which is sorta equivalent to:

42;

Which doesn't do anything :)

Comments:


Just wait untill you get to multi dimensional arrays in c++ now they are tricky ;D
 
Post a Comment

This page is powered by Blogger. Isn't yours?