open two console from c++ program

Hello,

i wrting c++ program in which i want to open two console so that one console have one function runing and other function have second function runing


main()
{
funtion_1() // run in first console
funtion_2() // run in second console
}
No can do with standard C++. C++ doesn't even guarantee that the output happens on a console at all, it could go to a file or a printer for all you know.
As far as I know the console is bound to the prcess. So you have to 'funtion_2()' in another process. You can start another process from you current...
Look into multi-threading.
On Windows, there are functions for creating a new console, but I don't know if it's possible to have more than one at a time. I have used these functions, but that was to add a debugging console to a graphical program (to control the program with text commands). I only had one console open, and I never got it to work.
Topic archived. No new replies allowed.