Function in xcode
Posted
by Joy
on Stack Overflow
See other posts from Stack Overflow
or by Joy
Published on 2010-04-30T06:34:43Z
Indexed on
2010/04/30
6:37 UTC
Read the original article
Hit count: 170
iphone
I have a function which have two global variable 1.temp-a nsmutable array 2.j-a int type variable. But i cant access any global variable inside this function. I'm giving the code sample.
void print( NSArray *array)
{
NSEnumerator *enumerator = [array objectEnumerator];
id obj;
while ( nil!=(obj = [enumerator nextObject]) )
{
NSString *tem=[[obj description] cString];
[temp insertObject:tem atIndex:j];
j=j+1;
printf( "%s\n", [[obj description] cString]);
}
}
Looking forward to your response. Thanks in advance..
© Stack Overflow or respective owner