How to use cin as an argument ?
Hello. How could I rewrite the two following lines without using the input variable.
1 2
|
cin >> input;
scene->update(input);
|
Thank you.
you could create a function:
1 2 3 4 5
|
string input(){
string input;
cin >> input;
return input;
}
|
scene->update(input());
Topic archived. No new replies allowed.