Hello,
I'm studying a C++ book, and I find it very confusing in the constructors and deconstructors in classes. What are they? Like this is a code from the book:
class Bow
{
string color;
bool drawn;
int numOfArrows;
Bow(string aColor);
~Bow()
void draw();
int fire();
};
can someone tell me what constructors and destrucors do, and what do they do in this code? thank you.