View Single Post
Old 07-06-2006, 10:59 PM   #4 (permalink)
bla!!
Monster Techie
 
Join Date: May 2004
Location: /usr/root/mn/us
Posts: 1,122
Default

There are a couple of ways to do this.

The first is to always make sure the end of your array has a termination character (such as null or an empty string "")

Then when you loop through the array have the termination criteria be i == NULL or i == ""

The other way is to keep track of the length of your array from the beginning of your program. For example, declare your array to be a specific length at the very start of your program or procedure.

There is no built in length() function for C/C++ arrays
__________________


Its a frigging Laptop, not a Labtop!!!!
bla!! is offline   Reply With Quote