deck::deck(){
int i=0;
ostringstream convert1;
while(i<12){
convert1<<i+2;
if(i!=8 && i!=9 && i!=10 && i!=11){
deck::Deck[i].face=convert1.str();
else {
if (i==8){
deck::Deck[i].face="J";
}
if (i==9){
deck::Deck[i].face="Q";
}
if (i==10){
deck::Deck[i].face="K";
}
if (i==11){
deck::Deck[i].face="A";
}
}
//code to empty convert1 or rewrite
deck::Deck[i].s.color="Red";
deck::Deck[i].s.Suits="Diamond";
deck::Deck[i].value=i+2;
deck::Deck[i].point=0;
i++;
}
this is the output
2
23
234
2345
23456
234567
2345678
23456789
J
Q
K
A
how can i clear or rewrite the previously converted element? if i can't how can i convert from integer to string without using this method?
Thank you :)