Help with reading in a line of string

Hello, Thanks for your help.

line of code user enters:
Hi + Henry = polite

is it possible to store operands(in general i.e. -,+)?
 
 getline(cin,word1,'+') 
Last edited on
what does ,'+' do ?

If you take it out you can type a string, otherwise, cin is going to stop at the first special char.

try
getline(cin,word1);
i need to store the operand for later use..because the user has the option to enter '-', i just ended up storing it in a string
Last edited on
Topic archived. No new replies allowed.