Hi guys I'm trying to make a function to cut a card game stored in a array in half, I just would like to know if I can return two different array with my function
string* couperJeu(int idJoueur, string tab[52]){
string jeuJoueur1[26];
string jeuJoueur2[26];
if (idJoueur == 0){
for (int i = 0; i < 26; i++) {
jeuJoueur1[i] = tab[i];
}
}
if (idJoueur == 1){
for (int y = 26; y < 52; y++) {
jeuJoueur2[y] = tab[y];
}
}
return(jeuJoueur1, jeuJoueur2);
}
std::array(orstd::vector). Secondly, read aboutstd::pair.forloop will accessjeuJoueur2out of bounds