TIP: Click on subject to list as thread! ANSI
echo: c_plusplus
to: ALEX WALKER
from: THOMAS MAEDER
date: 1997-12-10 08:24:00
subject: Finding the end of an arr

AW>      Just wondering, if an array is passed to a function, is there a
AW>      to test for or find the end of the array without having the siz
AW>      the array passed to the function?
AW>      If it's a char string one could search/test for the null charac
AW>      but what if it's an array of integers?
No  way. The array is implicitly converted into a pointer to its first
element; no information about its length is passed.
AW>      Thanks for any suggestions.
Use a class encapsulating an array, like the standard  class  template
vector.
Thomas
---
 þ MM 1.0 #0113 þ All of the really good taglines are one character too lon
---------------
* Origin: McMeier & Son BBS (2:301/138)

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