@Cubbi
what i'm trying to do is that i have a vector containing integers and a vector containing strings.
a function when passed a char and and an integer n returns the nth integer in the vector or the nth string in the other vector. whether it returns the integer or the string depends on the char.
the pseudo code might be:
1 2 3 4 5 6 7 8 9 10 11 12 13 14
std::vector ints;
std::vector strs;
return_type int_or_string(char iOs, int n) {
return_type res;
if (iOs == 'i') {
res = ints[n];
} elseif (iOs == 's') {
res = strs[n];
}
return res;
}