Hi
I want to convet int to string in objective c how to do that.
my code.
for (i=0; i<=200; i=i+10) {
// here i want to convet the value of i into string how to do this
}
Thanks in Advance.
Hi
I want to convet int to string in objective c how to do that.
my code.
for (i=0; i<=200; i=i+10) {
// here i want to convet the value of i into string how to do this
}
Thanks in Advance.
Try this:
NSMutableString *myWord = [[NSMutableString alloc] init];
for (int i=0; i<=200; i=i+10) {
[myWord appendString:[NSString stringWithFormat:@"%d", i]];
//...
}
//do something with myWord...
[myWord release];
NSInteger
is simply a typedef
to the int
or long
data types on 32/64-bit systems.