For std::vector i can add new elements using Push_Back.
std::vector< int > Channels;
Channels.push_Back(5);
Channels.push_Back(7);
Channels.push_Back(8);
why should i reserve memory first and than add elements.
Channels.reserve( 3 );
Channels.push_Back(5);
Channels.push_Back(7);
Channels.push_Back(8);
Aucun commentaire:
Enregistrer un commentaire