dimanche 18 avril 2021

C++ system() function not running all wimdows program

Cstdlib function system() is not running some program located under window directory/system32. I can run a program in a normal command promp like this

msg * hello

But when i run the command in the function or system() it return msg is not recognised as internal or external command Here is the code:

#include<iostream>
#include<cstdlib>
Using namespace std;
int main()
{
system("msg * hello");
return 0;
}

Aucun commentaire:

Enregistrer un commentaire