|
From: Ioannis V. <no...@ho...> - 2002-03-26 19:40:52
|
> -----Original Message----- > From: dev...@li... > [mailto:dev...@li...] On Behalf > Of Graeme Foster > Sent: Monday, March 25, 2002 4:24 PM > To: dev...@li... > Subject: [Dev-C++] vectors > > When should an array be used and when should a vector be > used? ============================================================== > If you know before hand how many elements will be used then > use an array, if however the number of elements is not known > then use a vector. No, always use vectors and if in need to squeeze every cycle out in terms of speed use valarrays (they have the speed of optimised Fortran arrays). Ioannis * Ioannis Vranos * Programming pages: http://www.noicys.cjb.net * Alternative URL: http://run.to/noicys |