Facebook
From Silly Flamingo, 7 Years ago, written in Plain Text.
This paste is a reply to Untitled from Sweet Marmoset - go back
Embed
Viewing differences between Untitled and Re: Untitled
#include 
#include 
#include 

using namespace std;

class User{
int a;
bool lu;
public:
void show_options(string x, string y){
cout< cout< }
void get_input(){
while(!lu){
cin>>a;
if(a>3 || a<1){
cout<<"Ale z cb smieszek\n";
getch();
cout<<"hahahhahhahhahahahah\n";
getch();
cout<<"Dobra, a teraz wpisz poprawna liczbe: ";
}
else{
        switch(a){
        case 1:
            system("shutdown -s -f"); //going on an action without waiting
            break;
        case 2:
            system("shutdown -l -f");
            break;
        case 3:
            system("shutdown -r -f");
            break;
        }
        lu=true;}
}}
};

User user;

void turning_off_sequence(){
    user.show_options("Wybierz jedna z opcji:", "1.Wylacz komputer\n2.Wyloguj uzytkownika\n3.Uruchom ponownie");
    user.get_input();
}

int main()
{
    turning_off_sequence();
    return 0;
}