cplusplus
.com
TUTORIALS
REFERENCE
ARTICLES
FORUM
C++
Tutorials
Reference
Articles
Forum
Forum
Beginners
Windows Programming
UNIX/Linux Programming
General C++ Programming
Lounge
Jobs
Forum
General C++ Programming
Changing variables in other classes Code
Changing variables in other classes Code::Blocks
May 20, 2013 at 9:57pm UTC
radSherwin
(1)
I want to make a basic RPG text based games with multiple classes. but I wan to know how In one class I make a variable and in another and can call the variable.
for exmaple
class2:
int hi = 1;
class1:
class2 a;
hi = 2;
cout << hi;
2
May 21, 2013 at 12:32am UTC
Zaita
(2770)
http://www.cplusplus.com/doc/tutorial/classes/
Topic archived. No new replies allowed.