MSDOS Window

I have a console application that calls graphics.h to use BGI. Its a GUI. but when I run the code, both MSDOS and GUI opens up. Is there a way I can quit the MSDOS window and still be able to view the GUI.

Here is my code:

1
2
3
4
5
6
7
8
9
10
11
#include <graphics.h>
#include <iostream.h>

int main(void)
{
    initwindow(400, 300);
    
    system("pause");
    
}
Thanks, that helped
Topic archived. No new replies allowed.