I have a struct
I also have another struct calledCode:struct Point { int x; int y; };
I have to put a fixed amount of points into the vector when the program now starts up. Is there anyway I can do this other than writing out this long thing...Code:struct Table { vector<points> vec; };
Code:Table createTable() { Table temp; Point tmpPoint; tmpPoint.x = whaterver; tmpPoint.y = whatever; temp.push_back(tmpPoint); tmpPoint.x = whaterver2; tmpPoint.y = whatever2; temp.push_back(tmpPoint); tmpPoint.x = whaterver3; tmpPoint.y = whatever3; temp.push_back(tmpPoint); return temp; }