+ 1
d is empty. As long as a contains something, it will be outputted.
5th May 2021, 10:34 AM
加油 我先下了
加油 我先下了 - avatar
+ 2
You can just write d = "your string";
5th May 2021, 10:39 AM
Hape
Hape - avatar
+ 1
cin >> a >> d; or cin >> a; cin >> d; If the input is "Hello there!", a will be "Hello" and d will be "there!".
5th May 2021, 10:40 AM
加油 我先下了
加油 我先下了 - avatar