Jump to content

I am doing an assignment for school and it just isn't working. I have to use the getline() function and specify a delimiter value for a new line character.

 

 cout << "What is your favorite food? ";getline(cin,favFood, '\n') ; 

 

Does anyone know what I am doing wrong?

Link to comment
https://linustechtips.com/topic/224058-c-help/
Share on other sites

Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×