0

How can I put "int x" after, "cin>>"? Because If I type in simply, gives me an error

1st Jul 2017, 11:58 AM
Nandor Tailor
Nandor Tailor - avatar
3 odpowiedzi
+ 7
int x; cin >> x; can you post your code so we can understand what you are trying to do
1st Jul 2017, 12:01 PM
jay
jay - avatar
+ 6
You could do this int x; cin >> x; but technically it is still two lines.. and it decreases readability, so don't 😊 You are welcome!
1st Jul 2017, 12:07 PM
jay
jay - avatar
+ 1
This way works well, I just wanted to make this happen in one line, btw thanks for answering
1st Jul 2017, 12:03 PM
Nandor Tailor
Nandor Tailor - avatar