You don't need special keywords for that. It's called member variable.
1 2 3 4 5 6 7 8 9 10 11 12 13
class A
{
int a; // Note: place the variable here
public:
void method1(void)
{
a = 1; // Note: no int before 'a'
}
void method2(void)
{
cout << "a from method1:" << a << endl;
}
};