#include <iostream>
usingnamespace std;
int main()
{
//are usernames just going to be numbers? Usually I'd think of a username being a string, not an int.
int createdUN;
int realUN;
int guessedUN;
//realUN has not been initialized to any valid value, not sure what you mean to do here
createdUN=realUN;
{
cout<<"create a username: "<<endl;
cin>>createdUN;
}
//neither guessedUN or realUN have been initialized with a valid value, this isn't comparing valid values
while (guessedUN != realUN)
{
cout<<"Input username"<<endl;
cin>>guessedUN;
//realUN has not been initialized to any valid value to make a comparison here
if (guessedUN != realUN )
{
cout<<"wrong username! try again. "<<endl;
}
//realUN has not been initialized to any valid value to make a comparison here
//also = is assignment operator, == is equality operator
elseif (guessedUN = realUN)
{
cout<<"Correct Username!"<<endl;
}
}
system ("PAUSE");
return 0;
}