I know, I know... I can easily find hundreds of tutorials online about making classes in C++ for text-based RPG's, which I have!.. but I really need a better explanation and step-thru than the ones I've been finding..
First up for my RPG, I need a class for my character.. what would it look like? This is all that I've done for my code... Beware, it looks hidieous, mostly because I have no idea how to set up classes..
Code:
#include <iostream>
#include <string>
using namespace std;
int main()
{
class Player {
private:
int health;
int attack;
int defend;
public:
void move();
void attackmonster();
void drinkpotion() { health++;}
};
}
First up, I feel like I do not have the effecient header files needed. Second, I have no idea what to do with the variables in my "public" and "private", I just got it from a forum from another site I found on google, and switched some of the variable names up...
Can any one walk me through this plsssss =(
I am so confused ...................