#default constructor and vector
15 messages · Page 1 of 1 (latest)
When your question is answered use !solved to mark the question as resolved.
Remember to ask specific questions, provide necessary details, and reduce your question to its simplest form. For more information use !howto ask.
wdym
like lets say the private variables in a class are type int
in the default constructor, youd do int ... = 0;
what do you do if youre private variable is a vector
it will be created with the default constructor of the vector
as an empty vector
when you don't initialize fields which are classes, like the vector, the default constructor gets used automatically to initialize those fields
okay so i dont have to make it equal to anything
no
bet thanks
This question thread is being automatically closed. If your question is not answered feel free to bump the post or re-ask. Take a look at !howto ask for tips on improving your question.