project help--won't compile

I'm trying to write a game and for that game I need a Weapon class...Here is my code, but when I try to compile it I'm getting an error:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
  1 #include<iostream>
  2 #include<string>
  3 using namespace std;
  4 
  5 class Weapon{
  6   private:
  7     int hit_chance;
  8     int stamina_required;
  9     string weapon_type;
 10   public:
 11     void display(void);
 12     Weapon(string type, int sr, int hc);
 13     int get_stamina_required(void);
 14     bool did_you_hit(void);
 15 
 16 Weapon:: Weapon(string type, int sr, int hc)
 17       :hit_chance(hc), stamina_required(sr), weapon_type(type)
 18 {
 19 }
 20 
 21 void Weapon::display(void)
 22 {
 23  cout<< "hit chance=" << hit_chance << endl;
 24  cout<< "stamina required=" << stamina_required << endl;
 25  cout<< "weapon type is" << weapon_type << endl;
 26 
 27 }


I'm getting this error code:
1
2
3
4
5
6
7
8
project_two.cpp:16: error: extra qualification 'Weapon::' on member 'Weapon'
project_two.cpp:16: error: 'Weapon::Weapon(std::string, int, int)' cannot be overloaded
project_two.cpp:12: error: with 'Weapon::Weapon(std::string, int, int)'
project_two.cpp:21: error: extra qualification 'Weapon::' on member 'display'
project_two.cpp:21: error: 'void Weapon::display()' cannot be overloaded
project_two.cpp:11: error: with 'void Weapon::display()'
project_two.cpp:27: error: expected '}' at end of input
project_two.cpp:27: error: expected unqualified-id at end of input
Add }; to line 15.
Topic archived. No new replies allowed.