Recently, I was charged with maintaining a windows console application written in C++ in Visual Studio. I can run it from the console by just typing the program name, for eg. program_name.exe . However, when I run it in windows 10, it opens a new command prompt window and prints its output to that window. However, in other versions of windows, like windows server 2019 it does not open a new command prompt window but prints its output in the same command prompt window from where it was launched. I don't want it to open a new command prompt. I want it to give its output in the same command prompt where it was launched. How do I fix this issue in windows 10?
Additional info: This application is a .exe which also invokes a .dll library.