| TIP: Click on subject to list as thread! | ANSI |
| echo: | |
|---|---|
| to: | |
| from: | |
| date: | |
| subject: | Re: Pointer Arrays |
JB> void battle(int id[])
JB> int num = sizeof(id) / sizeof(int); // A variable number of objects get
pa
try "void battle(int* id, int size) "
make the caller give you the sizeof the array.
The procedure may only be giving you the size of an int* because
an array name is just a pointer to the first element in that
array.
--- GEcho 1.00
---------------
* Origin: Digital OnLine Magazine! - (409)838-8237 (1:3811/350) |
|
| SOURCE: echomail via exec-pc | |
Email questions or comments to sysop@ipingthereforeiam.com
All parts of this website painstakingly hand-crafted in the U.S.A.!
IPTIA BBS/MUD/Terminal/Game Server List, © 2025 IPTIA Consulting™.