|
From: Rory W. <ror...@ea...> - 2007-07-04 15:43:51
|
You can use the resize() like this: myvector.resize(10); for(int i=0;i<10;i++) myvector[i] = 0; More details on vectors can be found here: http://www.cppreference.com/cppvector/index.html regards, Rory. Lloyd wrote: > Hi, > How can I resize a vector (in STL) and initialize "all" the nodes with > a particular value? > > Thanks and regards, > Lloyd > > > ______________________________________ > Scanned and protected by Email scanner > > ------------------------------------------------------------------------- > This SF.net email is sponsored by DB2 Express > Download DB2 Express C - the FREE version of DB2 express and take > control of your XML. No limits. Just data. Click to get it now. > http://sourceforge.net/powerbar/db2/ > _______________________________________________ > Dev-cpp-users mailing list > Dev...@li... > TO UNSUBSCRIBE: http://www23.brinkster.com/noicys/devcpp/ub.htm > https://lists.sourceforge.net/lists/listinfo/dev-cpp-users > |