While gazing into my crystal ball, I saw a message from Cameron Clark to
Joshua Boehme
CC> try "void battle(int* id, int size) "
CC> make the caller give you the sizeof the array.
CC> The procedure may only be giving you the size of an int* because
CC> an array name is just a pointer to the first element in that
CC> array.
I already changed it. I had tested it with:
int foobar[] = {1, 2, 3, 4, 5};
int size = sizeof(foobar) / sizeof(int);
with size coming to 5, but it didn't work on passed arrays.
--- FMail 1.02
---------------
* Origin: The misty isles of Stonegaia (1:159/600)
|