hoi ik ben erg nieuw met programmeren en ik heb er nog niet heel erg veel verstand van.
maar ik doe mijn best dus heb ik geprobeerd een simpel spelletje te maken.
bij ong de helft heb ik gekeken of hij wel wilde compileren.
en dat doet ie dus niet met 102 error's.
mijn compiler is visual cpp express edition 2008.
zouden jullie mij misschien een beetje op weg kunnen helpen ?
maar ik doe mijn best dus heb ik geprobeerd een simpel spelletje te maken.
bij ong de helft heb ik gekeken of hij wel wilde compileren.
en dat doet ie dus niet met 102 error's.
mijn compiler is visual cpp express edition 2008.
zouden jullie mij misschien een beetje op weg kunnen helpen ?
C++: filename
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
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
| #include "stdafx.h" #include <iostream> #include <string> using namespace std; class player { private: int health; int strength; int exp; int level; bool monster_attack_player; public: void set_health() { health = 10; } void set_strength() { strength = 5; } void set_exp() { exp = 0; } void set_level() { level = 9; } void get_health() { health = health + ( 5 + ( level / 8 ) ); cout << "\n\t HP ++! \n my health is "; cout << health ; cout << " !"; } void lower_health() { health = health --; cout << "\n\t HP --! \n my health is "; cout << health ; cout << " !"; } void get_level() { set_exp(); level ++; cout << "\n\t level up! \n i am level "; cout << level ; cout << " !"; } void get_exp() { exp ++; cout << "\n\t You have gained exp +! \n you exp is "; cout << exp ; cout << " !"; } void get_strength() { strength = strength ++; cout << "\n\t strength ++! \n my strength is "; cout << strength ; cout << " !"; } }; class monster { private: int health; int strength; public: bool bool_monster_atk; string monster_name; void attack() { cout >> monster_name; cout >> " is attacking you!"; bool_monster_atk = true } void change_name() { cin << monster_name; } void set_name_as_monster() { monster_name = monster; } }; int main() { cout << "welkom in mijn eerste rpg ooit \n\n\n"; player p_cha; monster m_1; if (m_1.bool_monster_atk = true) { p_cha.lower_health; m_1.bool_monster_atk = false; } char f ; cin >> f ; return 0 ; } |