I quickly made this program in DEV C++ and have a few errors, heres a little background info on the program, there is a program at my school that allows the teachers to spy and take over your computer whenever so I did a little snooping and found that the file that i want to rename in the program is the file that enables the teachers to do that so without further ado:

#include <cstdlib>
#include <iostream>
#include <stdio.h>

using namespace std;

int main(int argc, char *argv[])
{
    int answer
    cout << "Welcome to the Vision6 Dis/enabler" << endl;
    cout << "Made By C Square 93" << endl;
    cout << "Please answer the following question and press enter" << endl;
    cout << "Is Vision enable right now?" << endl;
    cin >> answer;
    if (answer == yes) {
          rename("C:\SETTINGS.exe", "C:\harharhar.exe");
          cout << "You May now close the program" << endl;
          }
    if (answer == no) {
          rename("C:\harharhar.exe", "C:\SETTINGS.exe");
          cout << "You may now close the program" << endl;
          } else {
                 cout << "Next time answer yes or no" << endl;
                 }
    system("PAUSE");
    return EXIT_SUCCESS;
}

So can anyone help me?

Recommended Answers

All 5 Replies

doesn't vision disable all keyboard and mouse input? Is your teacher blind?
Upgrade to VC++ -- There is a (free) express edition.

I guess he hasnt noticed lol

In strings, the \ character is the first character of a pair, like \n, \t, etc. If you want a \ in a string you need to use \\.

I don't see the main purpose of the program

I'm closing this thread because what the op wants to do is not legal.

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.