ok, i know there's an isset() function in php to determine whether a variable has been initialized... however, i do not know if there is a similar way to check this in c.
basically, i have an array of strings using the old array of chars method, and i would like to save overhead by not initializing the entire thing, because not all of it will be potentially filled. Hoever, i do need to check whether i have set one of the elements in the array so that i stop my loop of accessing each item once i get to the end of those that i've initialized.
before i used if(arrayname[i]) //stuff
but that was causing problems, because sometimes there would be old memory taking that space and it wouldn't know that the space was not filled yet.
one of my ideas to solve this would be to make a counter to determine the last set value in the array of strings, but i would rather have a friendlier method that can actually test if it is set.
thanks in advance.
----------------------------
Aeon of Darkness MUD - Free Online Roleplaying Game
http://aeonofdarkness.com