runtime error
"not recognized as an internal or external command, operable program or batch file"

# include <stdio.h>
# include <stdlib.h>
# include "iostream"
using namespace std;
int main()
{
    char ch;
    cout<<"Do you want to Logoff your computer now(y / n) \n " ;
    cin >> ch;
        if (ch == 'y' || ch == 'Y'){
            system("C:\\Computer");
            cin >> ch;
            ch=getchar();
        }
        else
            cout << "Not Working";
        system("pause");
        return 0;
}

Recommended Answers

All 2 Replies

line 11 is wrong. There is no such command as c:\Computer.

I just make a shortcut in C drive.....
I want to open that shortcut....
And the Line 8 should be

cout<<"Do you want to open Computer(y/n)\n ";
Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.