Error: expected unqualified-id at end of input

Pseudo-code of my name.cpp code:
1
2
3
4
5
6
7
8
9
#include...
using namespace std

...var
...functions
void className::classFunc(){

}//}; //Line 988
 //Line 989 



name.cpp:988: error: expected `}' at end of input
name.cpp:988: error: expected unqualified-id at end of input


Any ideas? These errors are all new to me.
Looks like you have a mismatched brace somewhere in your 988 lines :s
I checked them all and they all worked out.
Can you show exactly the contents of lines 986 to 990?
Just throwing this out there: did you remember to put a semi-colon at the end of your class definition?
1
2
3
4
5
            } //985
        }
        t.endTime();
    }//};
//989 
yeah your missing a brace somewhere at the end of a function loop or statement and have an extra on somewhere
I am using Code::Blocks and I checked it by deleting each function that matched. So there was no missing bracket.
Is that in a class? Why do you have the ending }; left out?
At first I had my code in:
class className{
//CODE HERE
}
But then I commented out the "class className{" and "}".
We're getting nowhere. Is there some reason you cannot paste your entire code? If it's long you can use pastebin or LodgeIt...
I have posted it on pastebins:
http://pastebin.com/YDNA9r3e
Not sure what is wrong. The error only disappears when I remove all of the code except the includes...
Fixed the error.

By any chance does anyone know if when declaring an object of another class, should I declare it in the .cpp or the .h file?
Topic archived. No new replies allowed.