Hello all ,
I am just new to programming! I want to store the total number(deck.value) of several players evth having loop(players depend on user how many want).I tried many ways for that like vector and array.I dont know why I couldnt!Another thing,if user wants more cards,I want to give cards from old deck coz i dont want duplicates. anybody help me to solve out! :sad:
cout<<"how many player u want"<<endl;
cin>>n;
for ( i = 0; i < 3*n; ) {
int urtotal=0;
cout << " player" << n<< '\n';
for ( int j = 0; i < 56 && j < 3; i++, j++ ){
cout << deck[i].suit << deck[i].face <<" ";
urtotal+=deck[i].value;
}
cout<<urtotal;
/*cout<<"want more"<<endl;
cin>>cond;
while(cond=='y'){
urtotal =urtotal+rand()%1;
}
if(urtotal>42)
urtotal=urtotal-30;
else if(urtotal>31&&urtotal<42)
urtotal=urtotal-20;
else if(urtotal>21&&urtotal<32)
urtotal=urtotal-10;
cout<<urtotal;*/
}
:sad: