I need help with this problem. Is it possible to print the text before cin
.
For example:
#include<iostream>
#include<conio.h>
void main ()
{
char name[20];
cout<<"====================================\n";
cout<<"Enter your name: ";
cin>>name;
cout<<"\n====================================";
getch();
}
So i want the third cout
to be displayed before entering the name(cin
), so that the second =
-line is visible while entering the name in the line above.
To visualize it, I am trying to create a screen matching the below:
====================================
Enter your name: <CURSOR>
====================================