I am creating a C++ console application and want to check whether the command processor is available:
if (!system(NULL)) //check to see if command processor is available
{
fprintf(stderr, "Error: Command processor not available\n");
exit(EXIT_FAILURE);
}
My question is, can a console app exist or work without having a command processor attached to it? If when a console is created, it is always paired somehow with a command processor, then the code above would be redundant. Otherwise, the console window will appear, the program will run normally, but I just can't use system().