Is there a possibility to give get_ABCD()
parameters to use iterator on another given vector string? Something like get_ABCD(possible_hosts).
#include <iostream>
#include <vector>
#include <string>
#include <cstdlib>
#include <algorithm>
int main() {
void get_ABCD() {
std::vector<int> rand4w;
std::vector<std::string> possible_answers = {
final_years[rand4w[0]], final_years[rand4w[1]],
final_years[rand4w[2]], final_years[rand4w[3]] };
std::vector<std::string> possible_hosts = {
hosts[rand4w[0]], hosts[rand4w[1]],
hosts[rand4w[2]], hosts[rand4w[3]] };
//possibly many other vector strings
std::vector<std::string>::iterator it;
it = possible_answers.begin();
std::random_shuffle(possible_answers.begin(), possible_answers.end()); //shuffle possible answers
for (it = possible_answers.begin(); it < possible_answers.end(); it++)
std::cout << "\n" << *it << "\n";
}
system("pause");
}