|
Dumb vc question. Displaying 1-3 of 3 total.
1
TheGerf
|
I was thinking, what would this do?
int base_array[100];
int array[5];
int i;
base_array[array[i++]++]=i++;
Sorry, I'm at school and I'm bored...
TheGerf, not just any gerf.
Posted on 2001-01-15 14:20:14
|
grenideer
|
I've never put those incrementing ++ inside a variable array like that. I'm not sure if you could.
If you can, assuming i=0 since you didn't declare any value, whatever array[1] equals would be incremented by 1, and base_array[of that number] would end up equaling one. Really pointless actually.
Posted on 2001-01-15 14:56:44
|
andy
|
VC doesn't support incremental operators like real C does©
In real C, though, it would do this „I think, it's late¤
base_array[array[i]]=i+1;
array[i]++;
i+=2;
If you want a real thinker, try this:
--i=i++;
or
i++=++i;
'Never confuse a single defeat with a final defeat.' -F. Scott Fitzgerald
Posted on 2001-01-16 03:23:54
|
Displaying 1-3 of 3 total.
1
|
|