We're a community of 1.1M IT Pros here for help, advice, solutions, professional growth and fun. Join us!
1,080,464 Members — Technology Publication meets Social Media
Username:
Password:
Lost login information?
Start New Discussion Reply to this Discussion

Concatenation in C (objective C)

The following code runs, but it only returns the same string, as many counts as the array. I want to return all the objects in the array (values) to the "lblMessage", one by one. Where is my mistake?

int i;
	int count;
	for (i=0, count = [values count]; i<count; i=i+1) 
		self.lblMessage.text = [NSString stringWithFormat:@"%@\n%@", self.lblMessage.text, [values objectAtIndex:[values count]-1]];
	[values release];
}
6
Contributors
5
Replies
21 Hours
Discussion Span
2 Years Ago
Last Updated
6
Views
gabblesargh
Newbie Poster
1 post since Aug 2010
Reputation Points: 10
Solved Threads: 0
Skill Endorsements: 0

That's the strangest C code I've ever seen.

Ancient Dragon
Achieved Level 70
Team Colleague
32,275 posts since Aug 2005
Reputation Points: 5,852
Solved Threads: 2,591
Skill Endorsements: 70

Hey, what is that ???:|
I think not C language.....may be D, E or F...

No, seriously !!! what is that ????:confused:

kings_mitra
Junior Poster
122 posts since May 2009
Reputation Points: 9
Solved Threads: 23
Skill Endorsements: 0

Hi,
Where you find this code.This is C language code!!!!!!!!!!!!!!!!!!!!You can suggestion me where we find this....................

ananda2007
Newbie Poster
16 posts since Aug 2010
Reputation Points: 7
Solved Threads: 1
Skill Endorsements: 0

It's Objective-C, not C, and there is an extremely big difference between the two. Post it somewhere else, to a Mac/iPhone-related development forum, like MacRumors or the programming-oriented StackOverflow.

creeps
Junior Poster in Training
82 posts since Jul 2010
Reputation Points: 85
Solved Threads: 8
Skill Endorsements: 0

All of you have so much to say if it is C or not C completely ignoring thread title.

@AD, thanx for flagging post

peter_budo
Code tags enforcer
Moderator
15,812 posts since Dec 2004
Reputation Points: 2,871
Solved Threads: 944
Skill Endorsements: 52

This article has been dead for over three months: Start a new discussion instead

Post: Markdown Syntax: Formatting Help
 
You
View similar articles that have also been tagged:
 
© 2013 DaniWeb® LLC
Page generated in 0.5221 seconds using 2.69MB