Generally speaking C++ is used to create two different types of applications. Windows desktop applications, often called GUI (graphical user interface) applications, display windows for their user interface. The other type is a console application. The command prompt (cmd.exe) is an example of a console application. What you see when you start a console application written in C++ is the console that Windows creates for the program to display its user interface.
When a console application starts to run what you see depends on how the application was started. For example, If it was started by double clicking in Explorer what you see is the console created by Windows for the application. This console is not the command prompt displayed by cmd.exe. However, when a console application is started by another console application then Windows default behavior is for new console application to inherit the console of the parent process. An example of this is running a console application from a command prompt. The same console is shared by cmd.exe and the console application.