I'm using Xcode to learn C++. So far things are simple and output goes to a command window. What is the command that clears the old junk from this command window?
I think this is what you are looking for - choose Debug -> Clear Logs
Edit : Also, if this is what you are looking for, you can set a preference ( General -> Automatically clear logs). It will clear the command window each time you run the program.
Just for playing around and learning, you can use the string "\e[H\e[2J" to clear a VT100-style terminal. You're really supposed to use ncurses for that kind of thing, but that's more evil than you probably want to deal with at the start.