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
A simple question
A simple question
May 16, 2012 at 6:37am UTC
LifeFiber
(9)
Hello. I am curently learning about private classes and public ones.My question is , when i declare my variables private , should is put my functions private aswell or should i leave them in public? Thank you
May 16, 2012 at 9:09am UTC
Moschops
(7244)
Put functions you want to be able to call public. Put functions you want only that class itself to be able to call private.
If you make every function private, the class becomes rather useless.
May 16, 2012 at 9:57am UTC
LifeFiber
(9)
Thank you , i will give a try now.
Topic archived. No new replies allowed.