So, i'm following a tutorial provided by Microsoft Visual studio 2010. And i have sumbled upon an error while debugging, i have no experience using c++ so i don't know what to do from this point. I keep geting an error as followed...
This is my output...
1>------ Build started: Project: Test1, Configuration: Debug Win32 ------
1>Build started 5/13/2011 11:23:36 AM.
1>InitializeBuildStatus:
1> Touching "Debug\Test1.unsuccessfulbuild".
1>ClCompile:
1> say.cpp
1>c:\users\owner\documents\visual studio 2010\projects\test1\test1\say.h(2): error C2146: syntax error : missing ';' before identifier 'say'
1>c:\users\owner\documents\visual studio 2010\projects\test1\test1\say.h(2): error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
1>c:\users\owner\documents\visual studio 2010\projects\test1\test1\say.h(2): error C2470: 'say' : looks like a function definition, but there is no parameter list; skipping apparent body
1>c:\users\owner\documents\visual studio 2010\projects\test1\test1\say.cpp(4): error C2653: 'Say' : is not a class or namespace name
1>c:\users\owner\documents\visual studio 2010\projects\test1\test1\say.cpp(6): error C2065: 'count' : undeclared identifier
1>c:\users\owner\documents\visual studio 2010\projects\test1\test1\say.cpp(10): error C2653: 'Say' : is not a class or namespace name
1>c:\users\owner\documents\visual studio 2010\projects\test1\test1\say.cpp(12): error C2065: 'count' : undeclared identifier
1>
1>Build FAILED.
1>
1>Time Elapsed 00:00:01.35
========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped =============
This is my file. Say.h
1 2 3 4 5 6 7 8 9 10 11 12
class S
{
private:
int count;
public:
Say() : count(0) {};
void hello();
void goodbye();
};
THANK YOU!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! When i went back and looked at it, you were right. My keyboard must of messed up or something. Or maybe i just had a little brain freeze right there. Now i think it should run properly.