error in code--need help fixing

Here's my code and the error I'm getting:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
1 #include<iostream>
  2 #include "Weapon.h"
  3 using namespace std;
  4 
  5 class Knight {
  6   public:
  7    int stamina;
  8    Weapon weapon_in_hand;
  9    string name;
 10    bool attack(void);
 11   Knight(string n, int stam, string type, int sr, int hc)
 12 ;
 13 };
 14 
 15 bool Knight::attack(void)
 16 {
 17   int sr;
 18  get_stamina_required=sr;
 19 
 20 
 21 }


1
2
Knight.cpp: In member function 'bool Knight::attack()':
Knight.cpp:18: error: 'get_stamina_required' was not declared in this scope
get_stamina_required

WHat is that? Is it an int? A double? A char? A string? It doesn't exist. First create it, then you can use it.
Topic archived. No new replies allowed.