Did you try to incorporate any of DangerDev's code? Some of the lines using "printf" had problems, but when fixed, yielded a box that lined up for me. You could either change the "printf" statements to make them work or simply convert the "printf" statements to "cout" statements.
You say you "get too many spaces". In your original code that you posted I don't see you displaying any spaces at all. I am assuming that in this line:
c represents a character and that c is not a space. Please let us know whether you have gotten this working and, if not, please post some updated code.
Reputation Points: 2614
Solved Threads: 687
Posting Expert
Offline 5,372 posts
since Jan 2008