1. The "||" function

I am having a problem with understanding the "||" function. ( I know I probably sound stupid, I just started learning C++ tonight...) I was just looking at a little program, and when I use integer = 59602 everything works fine, when I use integer = 59602 || 59601 I start to have problems. Please help. (Note, its really late and I'm really sleepy so please be kind at my ignorance and/or stupidity and lack of proper explanation.)

2. typicaly || is used in boolean expressions.
if (a or b) is
if (a || b)

As a bitwise operator it logicaly Ors the two values
1 || 1 = 1
1 || 0 = 1
0 || 1 = 1
0 || 0 = 0

so it takes the binary equivalent of the two numbers and performs an || on each bit returning the result

3. Um curlious || is boolean or | is bitwise or. A little big of a different

4. ok here is what I have, What is the problem with it please?
Code:
```#include <iostream>

using namespace std;

int main()
{
int zipcode = 59602 ;

cin>> zipcode;
cin.ignore();
if ( zipcode == 59602 ) {
cout<<"Ok, good.\n";
}
else {
cout<<"Are you sure?\n";
}
cin.get();
}```

5. well since there isn't a || anywhere in that code I assume you had this
Code:
`if ( zipcode == 59602 || 59601 )`
you need to do this
Code:
`if ( zipcode == 59602 || zipcode == 59601 )`

6. YES thats it! ty but I am confused about
Code:
` int zipcode = 59602;`
Does that have nothing to do with the outcome?

7. Not really. You initalize zipcode to 59602 but over write that information with your cin>>zipcode;

8. ok, now I am trying to get a letter in plae of a number, i have the "char" tag, but when i put a letter in, it says that value "a" has not been used before,

9. you're question is too vague - either rephrase it or show us some code

my best guess though, is you need this line where you have "int zipcode":
char a;

on a side note: || is called an operator, not a function

10. ok, yet another problem:
Code:
```#include <iostream>

using namespace std;

int main()
{
int a;
int b = ( 5/9 * a - 32 ) ;

cout<<"Enter Farenheit temperature to convert to Celcius:\n";
cin>> a;
cin.ignore();
{
}
cin.get();
}```
Can someone tell me why this doesnt work?
Thanks for being patient with me, Im just trying to understand all the functions 100%

11. Your problem here is that you tried to inilialize b using a as part of the expression. However a at that point does not yet have a value assigned to it. So the expression ( 5/9 * a - 32 ) will use whatever value happens to reside in the address location associated with a. Since a has not yet been assigned a value by the user, there's no telling what it's current value is.

You should assign b = ( 5/9 * a - 32 ) ; after the cin >> a;.

12. >>int b = ( 5/9 * a - 32 ) ;
What you're doing is assigning a value to b. What you're trying to do is create a function, but b is a variable, so it just holds a value - i.e. what happens to a has no effect whatsoever on b. What your code does is perform an operation on a and store the result in b, not "define what b is in terms of a". Since at that point there is no value in a, you'll end up with some garbage value in b that never changes.

Refer to Scribbler's post for the solution to your problem.

13. another thing that anyone has yet to point is that dividing 5 by 9 is likely to produce a floating point value. rather than "int b " you should use "float b", otherwise a number like 123.456 becomes simply 123 (it does not get rounded).

14. Ok, all the suggestions have not helped, this is what i have, and everytime i get -32 as the output
Code:
```#include <iostream>

using namespace std;

int main()
{
float a;

cout<<"Enter Farenheit temperature to convert to Celcius:\n";
cin>> a;
float b = ( 5/9 * a - 32 ) ;
cin.ignore();
{