stange cout

已回答
cout << "INSERISCI STRING1: ";
cin >> string1;

cout <<"INSERISCI STRING2: ";
cin >> string2;

if i write in this way the output is

inserisci strin1:""

 inserisci string2:"

why clion put the space in the new line and not in the current line as i write?

0
Avatar
Permanently deleted user

By chance are you using mingw on Windows? If so, there are a handful of bugs related to this. I'm not sure what the authoritative bug tracking the issue is, but one such is https://youtrack.jetbrains.com/issue/CPP-17579 

There is a work around listed on that bug.

1

请先登录再写评论。