T
ThaDoctor
Hi.
I am quite new to C++ so I think I would ask here what I am doing
wrong with this code.
I am writing a little game in a text console, but here is something
that is in no way related to the game but when I am compiling this it
yields an error....
Why is that
#include<iostream>
using namespace std;
class Test
{
private:
int life;
public:
void player_test_life()
{
if(life <= 0)
{
cout << "Your dead" << endl;
}
else
{
}
}
void player_minus_life()
{
life=100;
while(life != 0)
{
--life;
Test:layer_test_life();
}
}
};
int main()
{
Test:layer_minus_life();
return 0;
}
Greetings Tobias, I am a new member of this group....
I am quite new to C++ so I think I would ask here what I am doing
wrong with this code.
I am writing a little game in a text console, but here is something
that is in no way related to the game but when I am compiling this it
yields an error....
Why is that
#include<iostream>
using namespace std;
class Test
{
private:
int life;
public:
void player_test_life()
{
if(life <= 0)
{
cout << "Your dead" << endl;
}
else
{
}
}
void player_minus_life()
{
life=100;
while(life != 0)
{
--life;
Test:layer_test_life();
}
}
};
int main()
{
Test:layer_minus_life();
return 0;
}
Greetings Tobias, I am a new member of this group....