dimanche 30 décembre 2018

Is there any difference between std::vector::resize and direct initialization to zero

Is there any difference between:

std::vector<int> B;
B.resize(N);

and

std::vector<int> B(N); //or std::vector<int> B(N,0);

or is the second method the short form of the first method?

Aucun commentaire:

Enregistrer un commentaire