I am writing a program that lets the user enter the name and surname of his employees. I also need to put this information in a table , under the headings NAME SURNAME, where the names would be put under the NAME headline and surnames and the SURNAME headlines.
The problem that I am finding is that when entering long names, the surname is also moving to the right, and hence it will no longer be under the SURNAME headline. My question is : How can I reserve 10 spaces for the name, so that the SURNAME won't move to the right ?
This is what is happening :
NAME SURNAME
Alan___________Smith <-- I want the surname to be exactly under the heading.