Question

I need help with my code on Cocoa Touch (for iOS/iPhone). I want a function when dismiss SecondViewController finish, because I need to pass one string to from second view controller to first view controller.

When I include First View Controller in Second View Controller, the debugger return this:

"Expected specifier-qualifier-list before FirstViewController"

Thanks for all and sorry for my english. Lucas Moreira.

Was it helpful?

Solution

That's the compiler saying that, not the debugger. (Notice that it's in the Build Results window. Since you did not complete the build, your code has not run yet; when you do get it to run, it will run under the debugger. Messages from the debugger, and from your running app, appear in the Debugger Console window.)

Expected specifier-qualifier-list before FirstViewController

That's a syntax error. Your code is syntactically invalid; the compiler cannot understand it.

You should probably change your compiler to clang in your Xcode build settings, as clang has better error messages than the default GCC compiler. If you still can't make sense of the problem, edit your question to include your code for the function or method that the compiler doesn't like.

At a guess, either you forgot a semicolon on the line before the one the compiler pointed to, or you forgot to put the function or method body in braces ({}).

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top