Return Styles: Pseud0ch, Terminal, Valhalla, NES, Geocities, Blue Moon. Entire thread

C++ classes

Name: pieisgood 2008-02-06 18:50

I am just starting out programming. I want to make a calculator for all the questions I will be asked in my trig class, but I only want this on my computer so I could try to learn trig and programming sort of together.

That's not why I am here though. I am here because classes confuse the fuck out of me. I do not understand how to "think" in terms of classes. Dereferencing pointers to public blah blah blah. It's all very weird. I was wondering if you guys knew anything that could distill the idea of how to think of classes and how to write them.

Name: Anonymous 2008-02-06 19:07

Yes, that's the basic jist of classes. You have a set of "private" related data which you're interested in, and you work with that data indirectly through "public" functions. The advanatage of this style of programming is you can change the data, without having to change the public functions, and things should still work correctly.

Like if you decided one day a duck has alien_organs instead of normal internal_organs, then the duck can still quack and shit and swim.

Newer Posts
Don't change these.
Name: Email:
Entire Thread Thread List