Raised This Month: $ Target: $400
 0% 

Check if 2d array contains no data


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Author Message
hlstriker
Green Gaben
Join Date: Mar 2006
Location: OH-IO!
Old 06-04-2007 , 13:38   Check if 2d array contains no data
Reply With Quote #1

How can I check if a 2d array has data stored in the first dimension or not. I thought checking if it is 0, but that gives me a compile error "array must be indexed (variable "array2d")".

Example:
Code:
new array2d[33][128]; for(new i=0; i<32; i++) {     if(array2d[i] != 0)     {         // First dimension has no data?     } }
hlstriker is offline
 



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 10:39.


Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.
Theme made by Freecode