projecttwo.cpp: In function 'bool did_you_hit()':
projecttwo.cpp:34: error: 'hit_chance' was not declared in this scope
projecttwo.cpp:40: error: ISO C++ forbids comparison between pointer and integer
projecttwo.cpp: At global scope:
projecttwo.cpp:48: error: ISO C++ forbids declaration of 'knight' with no type
projecttwo.cpp:54: error: expected identifier before '&' token
projecttwo.cpp:54: error: 'const' qualifiers cannot be applied to 'int&'
projecttwo.cpp:54: error: ISO C++ forbids declaration of 'knight' with no type
projecttwo.cpp:54: error: prototype for'int Knight::knight(std::string, int, int&)' does not match any in class'Knight'
projecttwo.cpp:48: error: candidate is: int Knight::knight(std::string, int)
projecttwo.cpp:58: error: 'bool Knight::on_horse' is not a static member of 'class Knight'
projecttwo.cpp:58: warning: extended initializer lists only available with -std=c++0x or -std=gnu++0x
projecttwo.cpp:60: error: expected primary-expression before 'if'
projecttwo.cpp:60: error: expected '}' before 'if'
projecttwo.cpp:60: error: expected ',' or ';' before 'if'
projecttwo.cpp:65: error: expected unqualified-id before 'else'
projecttwo.cpp:67: error: expected declaration before '}' token
projecttwo.cpp: In member function 'bool Weapon::did_you_hit()':
projecttwo.cpp:36: error: invalid use of member (did you forget the '&' ?)
projecttwo.cpp:40: error: invalid use of member (did you forget the '&' ?)
projecttwo.cpp: At global scope:
projecttwo.cpp:47: error: expected identifier before '&' token
projecttwo.cpp:47: error: 'const' qualifiers cannot be applied to 'int&'
projecttwo.cpp:47: error: ISO C++ forbids declaration of 'knight' with no type
projecttwo.cpp:53: error: expected identifier before '&' token
projecttwo.cpp:53: error: 'const' qualifiers cannot be applied to 'int&'
projecttwo.cpp:53: error: ISO C++ forbids declaration of 'knight' with no type
projecttwo.cpp: In member function 'bool Knight::on_horse(int)':
projecttwo.cpp:59: error: 'stam' was not declared in this scope
projecttwo.cpp: At global scope:
projecttwo.cpp:68: error: prototype for'bool Knight::attack(Weapon)' does not match any in class'Knight'
projecttwo.cpp:46: error: candidate is: bool Knight::attack()
projecttwo.cpp: In function 'int main()':
projecttwo.cpp:82: error: 'knight' was not declared in this scope
projecttwo.cpp:82: error: expected ';' before 'k1'
projecttwo.cpp:84: error: 'k1' was not declared in this scope
projecttwo.cpp:94: error: expected ';' before 'k2'
projecttwo.cpp:96: error: 'k2' was not declared in this scope
projecttwo.cpp:97: error: no match for'operator>>' in 'std::cout >> "What is"'
projecttwo.cpp:97: error: 'name' was not declared in this scope
projecttwo.cpp:99: error: no match for'operator>>' in 'std::cout >> "What is knights weapon?"'
projecttwo.cpp:112: error: 'did_you_hit' was not declared in this scope
projecttwo.cpp:118: error: expected '}' at end of input
did_you_hit is the name of your method. At lines 36 and 40, you appear to be trying to use it as the name of a data member, by assigning it a value. What you actually want to do there is to declare a local variable to contain the value you wish to return, and then return that value at the end of your method.
At line 48, you haven't declared a return type for the (empty) knight method. If it's not returning anything, it should have a void return type.
Is knight supposed to be a constructor for your Knight class? If so, you need to change it to use the correct case - C++ is a case-sensitive language.
Line 58 is incomplete - you need to specify the arguments for the method.
At line 60, you haven't declared stam, as stated in the compiler errors.
At line 69, the arguments for the method don't match those in the prototype in the class definition, as stated in the compiler errors.