I am in the middle of debugging my project and I can't figure out for the life of he how to correct some of the errors
Our assignment is as follows
We are to make a program that implements class files so that we have the output
Havingone experienced runner, and one light weight runner as two separate methods
Sonia O’Sullivan walked 0 miles, ran 500 miles and jogged 0 miles
Sonia O’Sullivan walked 0 miles, ran 1000 miles and jogged 0 miles
Sonia O’Sullivan walked 0 miles, ran 500 miles and jogged 0 miles
You walked 10 miles, ran 0 miles and jogged 10 miles
------ Build started: Project: Jog, Configuration: Debug Win32 ------
Build started 7/15/2013 1:09:16 AM.
InitializeBuildStatus:
Touching "Debug\Jog.unsuccessfulbuild".
ClCompile:
Jogger.cpp
c:\documents and settings\administrator\my documents\visual studio 2010\projects\jog\jog\jogger.h(17): error C2144: syntax error : 'void' should be preceded by ';'
c:\documents and settings\administrator\my documents\visual studio 2010\projects\jog\jog\jogger.cpp(9): error C2511: 'Jogger::Jogger(void)' : overloaded member function not found in 'Jogger'
c:\documents and settings\administrator\my documents\visual studio 2010\projects\jog\jog\jogger.h(8) : see declaration of 'Jogger'
c:\documents and settings\administrator\my documents\visual studio 2010\projects\jog\jog\jogger.cpp(18): error C2065: 'marathoner' : undeclared identifier
c:\documents and settings\administrator\my documents\visual studio 2010\projects\jog\jog\jogger.cpp(19): error C2065: 'liteWeight' : undeclared identifier
c:\documents and settings\administrator\my documents\visual studio 2010\projects\jog\jog\jogger.cpp(34): error C2511: 'void Jogger::displayStats(int)' : overloaded member function not found in 'Jogger'
c:\documents and settings\administrator\my documents\visual studio 2010\projects\jog\jog\jogger.h(8) : see declaration of 'Jogger'
c:\documents and settings\administrator\my documents\visual studio 2010\projects\jog\jog\jogger.cpp(37): error C2511: 'void Jogger::clearStats(int)' : overloaded member function not found in 'Jogger'
c:\documents and settings\administrator\my documents\visual studio 2010\projects\jog\jog\jogger.h(8) : see declaration of 'Jogger'
Jog.cpp
c:\documents and settings\administrator\my documents\visual studio 2010\projects\jog\jog\jogger.h(17): error C2144: syntax error : 'void' should be preceded by ';'
Generating Code...
Build FAILED.
Time Elapsed 00:00:01.67
========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped ==========
I can't figure out how to correct some of these, especially the "jogger.h(8) : see declaration of 'Jogger'
Jog.cpp"
Jogger::Jogger (string name)
{
name = marathoner;
name = liteWeight;
}
marathoner and liteWeight variables are not defined in class and the code would wrong even if those variables were defined. I think that what you want to do is
I was able to figure it out except for calling the string name,
which is RADICALLY difficult to find an example just as this anywhere else on the internet...
THANK U!