// just example for explanation :) // vector containt strings vector<string> USERS; // take string from 'USERS' // under name 'user' in each time :) for(string user : USERS){ std::cout << user << std::endl; }