Being a strict type checking language, how c++ allows the extra comma after initialization of elements inside the map object is over. Is there any special meaning behind this?
Complete example can be seen here on cppreference.com
// Create a map of three strings (that map to integers)
std::map<std::string, int> m { {"CPU", 10}, {"GPU", 15}, {"RAM", 20}, };
Aucun commentaire:
Enregistrer un commentaire