So when i want something to literally equal 0 i do one and when i want it to emulate something its two equal signs?
I feel that you're not grasping the core difference here. To water it down:
The assignment operator (=) makes one thing another (changes its value).
The comparison operator (==) checks to see if one thing is the same as another (checks its value).
So this code declares an integer called 'a', then assigns it a value of 15.
Code:
int a;
a = 15; /* assigns a value of 15 to 'a' */
if(a == 20) /* compares the value of 'a' to 20; 20 is not 15, so this fails */
printf("'a' is 20\n");
else
printf("'a' is not 20\n");
This code declares an integer called 'a', assigns it a value of 15, and checks to see if it's equal to 20.