#include <iostream>
#include <windows.h>
#include <cstdio>
#include <fstream>
#include <string>
usingnamespace std;
int main(int argc, char** argv) {
std::cout << "starting my program!...\n";
system("C:\\abc\\xyz.bat"); //this xyz.bat starts xyz.exe with some instructions.
//i want to start this program in another console.
//but it starts in same consol and remain open. and below lines never exicuted :(
Sleep(3000); //it takes minimum 2.5 sec to load
std::cout << "started\n";
Sleep(2000);
return 0;
}