Hello.
I am attempting to write a little program that will allow a password to be printed out if you know the first password (the date) here's the code i have.
#include <iostream>
#include <cstring>
#include <time.h>
using namespace std;
int main(){
char password[8];
char guess[8];
cin >> guess[8]; cin.ignore(8,'\n');
_strdate( password);
if(strcmp (password,guess) != 0){
cout << "The password is aucn3siv5ntos93mnt768dnshc8823";
}
cin.get();
return 0;
}
However for reasons i cannot figure out the cin.ignore doesn't seem to be working, Anyone know what might be causing this?