This Program will log off or terminate all programs with C++ code in PC. There are many commands in C++ system class which directly access the user computer and make quick change in the system according to the code in program . In this problem we just used the system-f command which log off the system and terminate all the process.
Source Code
#include <iostream> #include <windows.h> using namespace std; int main() { char choice ; cout<<" \t \t \t LEP Tutorials \n \n "<<endl; cout<<" Do You Want to ShutDown All the Progrms ? Y/N "<<endl; cout<<" "; cin>>choice; if ((choice =='y' )||(choice =='Y' )) { system("shutdown -f"); } else { return 0; } }
0 comments:
Post a Comment