Is it still worth using classes if I will use only 1 object of a class?

As the title says, I'm curious about this. Thanks =)
Last edited on
Possibly is the only answer I could think of for that rather vague question.

It depends. Usually the answer is yes, but there are times when it isn't worth it. Does the class-ness organize your data and methods together into something that is easy to work with? What does having the class bring to your code? What does it look like if you don't have the class? Is this so simple that a struct (or public class) would do great (lose the getter/setter paradigm and keep it simple, but still coupled)? Also, a vector of int (etc, and a union would let you do a LOT of stuff) is sometimes (quite often, actually) just as good as a small class.
Thank you, guys!
Topic archived. No new replies allowed.