Witam!
Mam pytanie, dlaczego ten kod mi nie działa? Zrobiłem wszystko tak jak na poradniku z linku http://cpp0x.pl/kursy/Kurs-C++/Funkcje-w-klasie-czyli-metody/312.
#include <iostream>
#include "conio.h"
using namespace std;
class Mob
{
public:
//specific
string ename;
int elevl;
int ehp_max;
int ehp;
int emp_max;
int emp;
int est_max;
int est;
//nonspecific
int edefense;
int emelee_attack;
int emag;
public:
int melee_demage_calc(int melee_atck, int strength);
};
int Mob::melee_demage_calc(int melee_atck, int strength)
{
return(ehp=strength+melee_atck/edefense*24);
}