-> JB> void battle(int id[])
-> JB> { int num = sizeof(id) /
-> sizeof(int); // A variable number of objects get passed
-> I am afraid this doesn't do what you want. sizeof(id) is not the size
-> of the array you passed, it is the size of an int pointer.
sizeof() returns the size of the type.
sizeof(int) will return a 2 when using a 16-bit compiler, and 4 when
using a 32-bit compiler.
Dave - zanti@pacbell.net
--- QScan/PCB v1.19b / 01-0218
---------------
* Origin: The Target Range II 310/634-8993 (1:102/420)
|