constructors, copy-constructors and destructors info
Hi there! Let's start with saying that I do understand Danish, so it's not obligatory to answer in English..!-)I would like to know a little bit about constructors, destructors and copy constructors. I'm learning from this tutorial (If I remember correctly, it's "Sam's Teach Yourself C++ In 21 Days) - and it uses these constructors, and I understand them (almost) thoroughly. It's just this one thing I'm just eager to know, how you can know when to put braces and when not to:
class SomeClass // No braces
{
public:
SomeClass();
SomeClass(const SomeClass &);
~SomeClass();
}
class SomeClass // With braces
{
public:
SomeClass() {};
SomeClass(const SomeClass &) {};
~SomeClass() {};
}
Can someone give me an answer on this and help me to understand this..? Something tells me, it's not that important, but I would really like to know what I'm doing! ;-)