0
ONE variable , MANY values ?
is it possible to assign many values to one variable ,for example country = America,Algeria,...,Zimbabwe to assign the names of all countries in the world to one variable named country I tried but cannot make it work how to I achieve this using C++?
2 Réponses
+ 8
Try making an array of strings.
https://www.sololearn.com/learn/CPlusPlus/1625/
+ 6
Hoàng Nguyễn Văn has pointed you in the correct direction. This is just an example of his suggestion:
std::string countries = {"America", "Algeria"};