hello,
I wanted to ask you all a question.
suppose that my c++ program has read from a text file a set of characters like the one below using the command inData >> temp. i output the characters of the text file and stored all the characters in a string temp.
this is how it appears in the c++ output window:
ace
Spades
10
Spades
3
Clubs
King
Spades
5
Spades
Now i want to store the 'spades','spades','clubs','spades','spades' in a string known as string suit. And i want to store the 'ace','10','3','king','5' in another string to be known as string face.
This is where i am stuck. I can't seem to understand how to do it. I think that i have to create 2 string array.
i tried this:
str= temp;
//if(str!="Spades")
//cout << str << endl;
but it's not working.
then i tried this:
if(temp=='Spades')
//str = temp-'Spades';
it's definitely not working.
if someone could plz help me....
Thanks