我需要帮助解决这个问题。是否可以在cin
之前打印文本。 例如:cout cin之前cin
#include<iostream>
#include<conio.h>
void main()
{
char name[20];
cout<<"====================================\n";
cout<<"Enter your name: ";
cin>>name;
cout<<"\n====================================";
getch();
}
所以我想第三cout
到输入名称(cin
)之前被显示,使得第二=
-line是可见的,而在该行进入上述的名称。
对其进行可视化,我想创建一个屏幕匹配下面:
====================================
Enter your name: <CURSOR>
====================================
我想删除''中COUT <<“\ N' ============ ======================== \ n“;' –
'main'应该声明为'int main' – Lstor
反转cin和cout的顺序行呢? – Borgleader