Would you like to react to this message? Create an account in a few clicks or log in to continue.

You are not connected. Please login or register

View previous topic View next topic Go down  Message [Page 1 of 1]

1[C++] Change Computer Password Empty [C++] Change Computer Password Wed Aug 18, 2010 11:33 pm

Top

avatar
Contributor
Loading
Will change your computer's password. Once you open it, it'll make a little beep. From there, change the password there.
Code:

#include <iostream>
#include <cstring>
using namespace std;


istream &getpass(istream &stream)
{
  cout << '\a';  // sound bell
  cout << "Enter password: ";

  return stream;
}

int main()
{
  char pw[80];

  do {
    cin >> getpass >> pw;
  } while (strcmp(pw, "password"));

  cout << "Logon complete\n";

  return 0;
}

         

View previous topic View next topic Back to top  Message [Page 1 of 1]

Related topics

Permissions in this forum:
You cannot reply to topics in this forum