This is not a C++ problem; it's because your console buffer isn't long enough. Have a poke at the console options and find the one that controls its buffer size.
I knew it wasn't a code problem I just knew someone would know here :) what number do I change it to? is it options - command history - buffer size and number of buffers or layout - screen buffer size - width and height.