I am curious to how data is handled in the situation:
chapterlist.clear();
cScene newscene;
newscene.name = "Laura does something.";
newscene.words = 432;
newscene.pov = "Laura";
cChapter newchapter;
newchapter.scenelist.push_back(newscene);
chapterlist.push_back(newchapter);
chapterlist is a cChapter vector.
I am creating a new cScene object, and pushing it onto the scenelist vector of a new cChapter object, which I then push onto chapterlist.
My question is: when I am pushing objects onto a vector, is all the data being duplicated into the vector, while the old data is destroyed from the stack when the scope ends?
Or is something else happening???
PS: I hate pointers, as do many.