Objective-C app programming problem

  • Thread starter Thread starter ignaciocabero
  • Start date Start date
  • Tags Tags
    App Programming
AI Thread Summary
The discussion centers on troubleshooting errors in an iOS application developed in Objective-C. The user encounters two specific issues: "Expected identifier or '('" and "Missing '@end'", despite having the '@end' statement present. Participants suggest that the user may be missing closing square brackets in their code, which is critical for proper syntax. They emphasize the importance of sharing code as text rather than screenshots to provide better context for troubleshooting. Additionally, it is noted that some lines of code appear to be incorrectly placed outside of function definitions, which contributes to the errors. The advice given includes taking a step back to strengthen foundational knowledge of Objective-C, particularly regarding function definitions and syntax rules, to resolve these ongoing issues effectively.
ignaciocabero
Messages
10
Reaction score
0
So I'm currently developing a simple iOS Application, written in Objective-C, and I recently came across this problem.
ImageUploadedByPhysics Forums1408389074.010883.jpg
the first problem says "Expected identifier or '( '"
The second problem says "Missing '@end'" even though '@end' is clearly there. Any help would be great.
 
Technology news on Phys.org
Are you missing a closing square bracket after the string and before the semicolon?

The next line is also missing a closing square bracket too.
 
Thanks for the help but nothing worked :(
 
Please do us a favor and post your code as text rather than as a screen shot. With a screen shot we can't see anything beyond what you have copied, so we don't get what might be important context. For example, the line that says [hero.addChild : rightEye;] has a right brace just below it, but we can't see the opening brace.

As jedishrfu already noted, there are missing square brackets in the first line that shows an error as well as the line following it. Several of your other posts have exhibited the same problem.

The line of code that starts with ICHeroClass.name = [@"hero"; looks to me like it should be part of the definition of some function, but is not part of any function that I can see. That is a problem. Another clue is the line that says return hero.

My advice to you would be to put your project on hold for a while and invest some time in the basics of Objective-C. Until you get comfortable with the basic ideas such as how to write the header and definition of a function (and the purpose for the square brackets), you will be beating your head against a brick wall trying to get your code to work.
 
Dear Peeps I have posted a few questions about programing on this sectio of the PF forum. I want to ask you veterans how you folks learn program in assembly and about computer architecture for the x86 family. In addition to finish learning C, I am also reading the book From bits to Gates to C and Beyond. In the book, it uses the mini LC3 assembly language. I also have books on assembly programming and computer architecture. The few famous ones i have are Computer Organization and...
I had a Microsoft Technical interview this past Friday, the question I was asked was this : How do you find the middle value for a dataset that is too big to fit in RAM? I was not able to figure this out during the interview, but I have been look in this all weekend and I read something online that said it can be done at O(N) using something called the counting sort histogram algorithm ( I did not learn that in my advanced data structures and algorithms class). I have watched some youtube...
Back
Top