Why wont my C++ code recognize a returned value?

First of all, here’s my code:

#include

making use of namespace a sexually transmitted disease;

category Account

public:

void Combatlevel(int x)

x=level;

int Getlevel()

come back level;

individual:
int degree;

;

int main()

Akun ObjAccount;
ObjAccount.Combatlevel(131);
cout << "your battle level is"<< endl;
cout << ObjAccount.Getlevel();

come back 0;

I’m looking for the program to screen-print out this Getlevel() job (I’m doing using arrest and personal specifiers), but while i activate this program it presents me 2147336192 instead of 131…where your heck do that humongous number come coming from and how could i fix my code for you to output what I want >.<!
With thanks:) (I’m making use of Code::Obstructions 10.05 whenever that helps, with any c++ undertaking file.)

This signal:

void Combatlevel(int x)

x=level;

Doesn’t accomplish what you intend it to perform.Study it Very carefully.

Wish that helps.

the reason in CombatLevel is actually wrong.

Leave a Reply