and instead of \n i've heard that it's better to use endl because it's not specific to platform, it can be used on various ones since endl is part of the standard library. Correct me if i'm wrong.
This really isn't very good and I'm sure there's a better way, but you could try adding this:
1 2 3
system("cls");
cout<<"Enter your name: "; cout << name;
cout<<"..........Name entered\n";
This way is really only an "I don't know what to do so I'll just throw down something that works" kind of thing. I recommend looking in the reference section for something better.
you can rewrite it as this: cout << "Enter your name: " << name << "................. Name entered" << endl;
just makes it cleaner you can have as many of the << as you want. as long as it's a cout because you are using the cout from the beginning so it's going to cout everything that you do on that line of code. or you can make it like this (I believe, i've seen other people do something like that, i use the other one though):
1 2 3 4
cout << "Enter your name: "
<< name
<< "................. Name entered"
<< endl;
The standard library as far as I know doesn't offer any means of offering the equivalent of a backspace. You would have to either use a different library (curses, but I mean the library called curses; I'm not cursing) or clear the screen and print out everything again with the desired modifications as if nothing happened. If you choose to go with the second option, stringstreams might be of use. :)
I suggested the stringstream so you can easily store that which has already been printed out to the console, with all the desired exceptions. Combine with an std::string for easy string manipulation!