Witam. Siedzę już 6 godzinę przed jednym plikiem, bo ciągle mam błąd gdy próbuje odczytać statystykę. I nie rozumiem czemu tak jest. >>>
#ifndef heros_statistic_h
#define heros_statistic_h
#include<iostream>
#include<cstdlib>
void warrior_attributs()
{
int strenght_warrior=50;
int stamina_warrior=8;
int sleight_warrior=20;
int intelligence_warrior=8;
int state_money_beginn=500;
int deffence_warrior=sleight_warrior;
int life_warrior=stamina_warrior*50;
int minimal_damage_warrior=strenght_warrior*1;
int maximal_damge_warrior=strenght_warrior*2;
int damage_warrior=rand()%minimal_damage_warrior+maximal_damge_warrior;
}
#endif
i to próbuje wczytać do
#ifndef hero_description_h
#define hero_description_h
#include<iostream>
#include<cstdlib>
#include "heros_statistic.h"
using namespace std;
{
cout<<"Warrior is a guise, the fighted with a one-armed weapon and two-armed weapon, but the can´t fighting with daggers and chachts. The warrior merked with a big physical injuries";
cout<<", but with a small deffences. The warrior had a skill, the names catching pancery, the strengthened his deffence \n";
}
#endif
I gdy wpisuje>
cout<<strenght_warrior;
Wyskakuje mi:D:\krzytsian\gierka skrot\heros_decription.cpp|13|error: 'warrior_damage' was not declared in this scope| i nie wiem z jakiej przyczyny i już głupieje. Mógłby mnie ktoś nakierować na bład?
EDIT>> Przepraszam za mój okropy angielski :)