I just started reading about classes in my cpp book, and I have a few questions that will surely sound stupid to a few people, but, bear with me.
Initially, I was declaring classes within main (data only), but then my book showed some examples, and they were all global (which I understand now, becuase they can't be local when they have member functions. A am correct is saying this, right? I assume that it is good protacol to always declare them globally?).
So then I was asking myself, why not just declare all of the member functions within the class declaration itself? Isn't it easier to declare them in the class than to declare them outside and use the :: operator to tell the compiler which class they belong to?
thanks the help, greatly appreciated