i know i shoud have read a book, but..
i went with the internet tutorials, hoping to learn.
i'm trying to understand how std::list works. i've found some tutorials here: http://www.cppreference.com/cpplist/all.html
i don't know exactly what std::list is, but it looks like it's redefining the syntax some how, to allow me to use list iterators and vectors.
i tried this:
+ the "using" directives, and windows, iostream, list and algorithm includes.Code:int main(int argc, char *argv[]) {
list<int> v;
v.assign( 10, 42 );
for( int i = 0; i < v.size(); i++ ) {
printf("%d\n",v[i]);
}
system("pause");
}
i'm trying to compile this with devc++ 4.9.9.0 but it doesn't really work.
what am i doing wrong?
thanks guys :)