Hi Guys
I am finally taking the step from C into C++, so here is my question . I am wondering is their a specific programming reason or just programmer preference when declaring methods inside or outside of a class.
Thanks in advance
whistlenm1
Hi Guys
I am finally taking the step from C into C++, so here is my question . I am wondering is their a specific programming reason or just programmer preference when declaring methods inside or outside of a class.
Thanks in advance
whistlenm1
Man's mind once streched by a new idea, never regains its original dimensions
- Oliver Wendell Holmes
In other words, if you teach your cat to bark (output) and eat dog food (input) that doesn't make him a dog. It would have to chase cars, chew bones, and have puppies before I'd call it Rover ;-)
- WaltP
i am wondering why you are asking this question in this forum...???? why not use one of the c forums?
Because the C forums are usually used when people actually want code.
Anyways - for your question - Yes, there are programming reasons. Declaring a method in the class promotes encapsulation. If there's no methods in the class, it's really not much more that a struct.
-Govtcheez
[email protected]