Hey, just wondering:
OK, so now we've got a vector of Stuff's called stuffs, and it is holding 5 Stuff's. Do I have to manually remove each Stuff from the vector before the program ends, or is that built into its destructor or something?...Code:std::vector<Stuff> stuffs; for(int i = 0; i < 5; ++i) { stuffs.push_back(Stuff()); } //more stuff goes here
Code:while(stuffs.size() > 0) //Is this { //part stuffs.erase(&stuffs[0]); //necessary } //here?