attempting to define character attributes

something most of you can undoubtedly do already but im struggling with, i would love a valid solution for defining a characters name as a string and then 3 diffrent traits such as strength intelligence and stealth
nothing? not even a suggestion?

im dying here guys i could really use the help
O.O

You're having trouble declaring a string!?

Here's how that's done:

string P1_Name;
There are better ways to do this though ;)

Look into classes, you'll find the answer there. Good Luck!
Last edited on
Do you mean a struct/class such as

1
2
3
4
5
6
7
8
9
class Character
{
...
private:
  string m_Name;
  int m_Strength;
  int m_Intelligence;
  int m_Stealth;
};
Topic archived. No new replies allowed.