how to remove

hi i am new to this and an working on a programme basically i want to know how to remove the 'speech' part after its printed i.e

#include<iostream>
using namespace std;

void main()
{
char a [10];

cout<<"enter name"<<endl;
cin>>a;
cout<<"name is"<<a<<end;
}

while the programme runs i wish for the first statment to be removed from screen after cin>>a;

so will just be left with ' name is_______'


many thanks



use code tags please. ( [ code ] //your code here [ /code ] )
this is what you want:
1
2
3
4
5
6
7
8
9
10
11
12
#include<iostream>
using namespace std;

void main()
{
char a [10];

cout<<"enter name"<<endl;
cin>>a;
system("cls");
cout<<"name is"<<a<<end;
}
Last edited on
thank you very much been working on a much bigger programme and this has been annoying me for a while (4 days ) lol been trying everything thanks again
btw, don't use system(), it's bad...
Topic archived. No new replies allowed.