Hey, I wrote this code that makes you type two things, then it checks if it is the same. Well, that was it was supposed to do, but then it kept saying:
expected primary-expression before "else"
expected ';' before "else"
Here's the code
#include <iostream>
#include <time.h>
#include <windows.h>
#include <string.h>
#include <conio.h>
using namespace std;
//global variables
char pass1[1000000] = {0}, pass2[1000000] = {0}, pass3[1000000] = {0};
bool checker=1;
int counter=0, thing=100;
int passCount=0;
int counter1=0;
int main(){
cout<<"Welcome to the password checker."<<endl;
cout<<"Please enter your new password."<<endl;
while (true){
//input
cin>>pass1;
cout<<"Please enter it again."<<endl;
//enter again, like in those input things
cin>>pass2;
while (counter1<1000000){
if (!(pass1[passCount]==pass2[passCount])){
thing=200;
else
;
}
passCount++;
counter1++;
}
if (thing==100)
cout<<"Okay. Password Saved."<<endl;
break;
else if (thing==200)
cout<<"Sorry, your two passwords are different, please type them again."<<endl;
}
Please tell me what's wrong.