Noob coding question 10-18-2016, 01:42 AM
#1
I'm having a problem with my code, i'm a noob at programming i'm using c++ as you'll see and i can't get my if statement to work correctly, i'm trying to set my letters equal to numbers, i set the name equal to what they would be via the ASCII thing. I want to say "what is your name" and they put their name and if its the name i put in the if statement then they will be asked to enter the password. I was going to rework the rest of my code but i figured i'd ask my question here first. Thanks in advance 

Code:
#include <iostream>
using namespace std;
int main()
{
int name;
int pass;
cout << "What is your name" << endl;
cin >> name;
if (name == 689711410599107)
{
cout << "Your name is relevant" << endl;
cout << "Enter the password" << endl;
cin >> pass;
}
else if (pass = 456)
{
cout << "Access Granted" << endl;
}
else
{
cout << "Leave Immediately" << endl;
}
}



![[+]](https://sinister.li/images/modern/collapse_collapsed.png)















![[Image: inkexplosion.jpg]](http://i0.wp.com/techverse.net/wp-content/uploads/2013/09/inkexplosion.jpg)





