Unexpected Unqualified ID

Discussion in 'Mac Programming' started by Ides, Jan 18, 2013.

  1. Ides, Jan 18, 2013
    Last edited: Jan 18, 2013

    macrumors member

    Mar 27, 2012
    I'm working on a program, being written in C++. I hit run and it built and ran fine. Then I added a simple "printf" in my code for a debugging purpose, and all of a sudden it failed to build. I removed the new line of code and it still fails to build. I click the red compiler error and it takes me to some header file called "__config" that gets included in iostream. It shows an error on an empty line of code, right before a namespace. I tried cleaning my project, restarting Xcode, and deleting the derived data folder. None of these worked. I'm also positive that I haven't edited this "__config" file ever.

    Edit: I figured it out: Somehow, at the very top of my main.c file, before the copyright comments I had two & signs just sitting there. And for some reason, Xcode was interpreting that as an error in one of the system headers. Way to go, Xcode.

Share This Page