You need to decide whether you want your program to be a command line program (in which case it should never assume it even has a window at all) or a windowed program (in which case it should never assume it even has a console at all).
The console window provided on some platforms is a convenience for interacting with non-windowed programs. The console is different on every platform/OS and you should never assume you will have the same size console or even the same ability to set colors, cursor position, or title.