Originally Posted by
boy
The point of the assignment was to optimize the loop, after trying the for and while loop methods, I found it faster to use the goto; for some reason. I am new to pointers so I was trying to follow an example to work with my code. If I don't add the de-referencing symbol, the compiler gives me the warning:" assignment makes pointer from integer without a cast".
I'd worry about actually getting it working before I started optimizing anything.
Code:
int *max, *end;
max = &end[ARRAY_SIZE];
What is it you think end is pointing at here?
Code:
array = allocate space
for( current = array, end = array + ARRAY_SIZE; current < end; current++ )
...do stuff
Quzah.