Making white spaces new variable signals

Here's the short of it. I am trying to input 3 values. x y and z. Usually when I would write code to have the user input the appropriate amount. The code would look something like:
cout<<"please enter three numbers"<<endl;
cin>>z; //each number must be followed by a return.

The question I have is: is there a way that I could have the inputs on one line and still be put into three different variables.

rather than having
I am looking to do:
4 5 6
with the white space signifing the next number will belong to a new variable.
Is this possible and if so how would I go about doing this?
You already have what you want.
And this whole time I thought I needed a return after each one.... The things I feel like right now. lol. Thanks man...
Try taking endline(endl;) off.
Topic archived. No new replies allowed.