Resize Console Window Question

Well hello there, recently I've make some string which contain a long sentence and a lot of words and when I run it to see the output, the sentence is to long to display in the default window console and they wrap into two lines which doesn't look good. Of course I should use endl or \n, but I'm to curious to seek a method how to resize the console window. And then I found this method to resizing the window. for example :
system("mode con: cols=110 lines=100");

I don't know if it is good or not but this thing works nice(for me at least) and fix my problems about resizing the console window thing. However I notice that this method is using system(""), I've been told that using this system thing is considered a bad habit and my friend said that it can destroy my processor(I dunno if he just joking or not), well forget my rambling,
What I want to ask is, is there any method beside using system("blabla") to resizing the console window ?

Thanks all..
Last edited on
Portable way: none, console is just a medium for input/output. std::cout can be easily and without program knowing it linked with file. Any changes in console settign should be done by user to suit his needs.

Unportable way: Using WinAPI. You can find information on MSDN or by asking people in Windows Programming forum.
Topic archived. No new replies allowed.