Is it better including Enum type data in public or private section of the class ? for example when declaring a class for a traffic light ?
This is a discussion on enum in class within the C++ Programming forums, part of the General Programming Boards category; Is it better including Enum type data in public or private section of the class ? for example when declaring ...
Is it better including Enum type data in public or private section of the class ? for example when declaring a class for a traffic light ?
if the enum is going to be for your classes internal use make it private. If clients of your class must be able to use the enum then make it public.
Free the weed!! Class B to class C is not good enough!!
And the FAQ is here :- http://faq.cprogramming.com/cgi-bin/smartfaq.cgi