I do see some other questions that look like mine, but I still can\'t figure this out.
Here\'s my code:
#include
#include
Here;
node newNode = node(i,NULL);
You are not creating a new node, just assigning a new value to it.
New nodes are being created inside the vector using the default copy constructor. If you want your vector to contain the nodes you are pushing into it you should use a pointer, like this;
vector*> vectorOfNodes;