TIP: Click on subject to list as thread! ANSI
echo: c_plusplus
to: JOSHUA BOEHME
from: ERIK WARMELINK
date: 1997-05-05 04:43:00
subject: Pointer Arrays

Joshua, you wrote to All:
 JB> Here is the code fragment:
 JB> void battle(int id[])
 JB> {
 JB> int num = sizeof(id) / sizeof(int);  // A variable number of 
 JB>                                      // 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.
Bye,
 Erik 
---
---------------
* Origin: WarmelinkE@vertis.nl (2:282/608.60)

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™.