Hey guys, I have a question about C++.
I've been learning it for a while now and I'm trying to get a better understanding of classes. I notice that some tutorials I look at create the member functions outside of the class description.
And then other tutorials put the function right in the class.
My questions is, what's the difference? Is there advantages to either approach?
I've been learning it for a while now and I'm trying to get a better understanding of classes. I notice that some tutorials I look at create the member functions outside of the class description.
class myClass{ void myFunction(); }; myClass::myFunction(){ }
And then other tutorials put the function right in the class.
class myClass{ void myFunction(){ //do stuff } };
My questions is, what's the difference? Is there advantages to either approach?