|
-
June 1st, 2010, 08:18 AM
#1
typedef struc
hi,
i have the following piece of code,
isn't the for loop supposed to loop while a x[i].x is present (->true)?
Cause it doesn't stop when there`s no x[] left....
typedef struct x{
int y;
}x;
x[]={
{123},
{123},
{123},
};
for (int i=0; x[i].x;i++){
//do stuff
}
I am sure, thoguh, i`ve seen this before and it worked.
thx,
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|