mercredi 14 septembre 2016

C++ vector reserve

The following C++ code

std::vector<unsigned char [784]> images;
uint32_t totalSize =  10;
images.reserve(totalSize);

gives the following error:

error: no matching function for call to ‘std::vector<unsigned char [784]>::reserve(uint32_t&) const’

and I can not really decide what is wrong here !

Aucun commentaire:

Enregistrer un commentaire