Size of float array declared is suing auto is different than actual size. why is it so ??
For e.g:
declaration:
float duto[] = {2.2222f,2.223f,34.5f,1.0f,9.0f};
auto dutot = {2.2222f,2.223f,34.5f,1.0f,9.0f};
Size print:
std::cout << " float array size v: " << sizeof(duto)<<std::endl;
std::cout << " auto v: " << sizeof(dutot)<<std::endl;
Output:
float array size v: 20
auto v: 16
Aucun commentaire:
Enregistrer un commentaire