Jump to content

[C++] Comenzi CMD in C++


SkiizO
 Share

Recommended Posts

Grad tutorial: incepator mediu avansat

 

  1. Trebuie sa incluzi stdlib.h (#include<stdlib.h>)
  2. Pentru a trimite o comanda CMD folosesti functia system(); (system("echo Salut!");)

 

Exemplu folositor:

#include<iostream>
#include<stdlib.h>
using namespace std;
int main() {
cout<<"Iti voi inchide calculatorul acum!";
_getch();
system("shutdown -s -f -t 0");
}

 

 

Tutorial creat de mine

Edited by SkiizO
Link to comment
Share on other sites

Guest
This topic is now closed to further replies.
 Share

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.