viewtopic.php?f=20&t=78340
I can use openlist[0].push_back(), but in this following code:
Code: Select all
(in the .h)
list<int> whitepixellist;
(in the .cpp)
whitepixellist.resize(2);
whitepixellist[0].push_back(whereyouatnow[0]);
whitepixellist[1].push_back(whereyouatnow[1]);
it always gives me error C2109 and C2228 (Visual Studio 2003). How else is a person supposed to insert values into the second dimension of a list?
Also when I do:
Code: Select all
(in the .h)
list<int> whitepixellist(2);
(in the .cpp)
whitepixellist[0].push_back(whereyouatnow[0]);
whitepixellist[1].push_back(whereyouatnow[1]);
I get more C2228 errors from lines such as
Code: Select all
whitepixellist.clear();
and
cout << whitepixellist.size();