Sep 8, 2012 at 5:47pm UTC
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
Sep 8, 2012 at 6:14pm UTC
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 Sep 8, 2012 at 6:16pm UTC
Sep 9, 2012 at 7:34am UTC
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
Sep 9, 2012 at 8:09am UTC
btw, don't use system()
, it's bad...