[ASK]C++ beginner

hello there...

1. why (a=1) != (a==1)??
what is the difference of (=) with (==)?
2. what is header files?
and what is <iostream> mean?what for is that?
---thanks---
---absolutely beginner---
'=' is an assignament symbol. You give the value at right to the variable at left.
Example:
'a = 4'
You made the number 4 be stored in the variable 'a'.
'==' is the equality symbol... In math, is like '=' (Remember that in C++ '=' is an assignament symbol!).

Aboout header:
They are files that allow you to do certain things, like, <string> allows you to use strings.
<iostream> is the most "basic" of them... Used in most programs. It allows use a lot of specific commands, etc.

(Sorry for my bad english >.<")
(I hope that is right...)


Take a look at:

http://www.cplusplus.com/doc/tutorial/program_structure.html

^ This is a structure of C++ program.

For operators (=, ==) see here:

http://www.cplusplus.com/doc/tutorial/operators.html

Good luck!
- thank you, now I understand.
(My english is bad to, sorry)
n thanks.
Topic archived. No new replies allowed.