How do C++ programs work?
To make my question more clear, I'd like to mention the reason for the question:- 

1) I want to know if my program will be OS-dependent. For example I though C++ was OS-independent; Now I know if I program in Visual C++, my programs will be Windows dependent. So, I would like to know how to make sure my program isn't OS-dependent.

2) I want to know what how the thing works in general to be comfortable when programming. (It helps to know what happens when you include a header file.)

3) Maybe I can optimize my programs with just knowing how the thing works, without having to read a book on optimization and consume time on optimization rather than development.



I know there are books on how compilers work. But I'm not interested in this, I'm only interested in knowing the phases programs go through to get a fully working a program for the reasons I've previously mentioned. **Maybe there are core phases and optional/IDE-dependent phases; if this is true, I would like to know both.** 

How do C++ programs work?
===

To make my question more clear, I'd like to mention the reason for the question:- 

1) I want to know if my program will be OS-dependent. For example I though C++ was OS-independent; Now I know if I program in Visual C++, my programs will be Windows dependent. So, I would like to know how to make sure my program isn't OS-dependent.

2) I want to know what how the thing works in general to be comfortable when programming. (It helps to know what happens when you include a header file.)

3) Maybe I can optimize my programs with just knowing how the thing works, without having to read a book on optimization and consume time on optimization rather than development.



I know there are books on how compilers work. But I'm not interested in this, I'm only interested in knowing the phases programs go through to get a fully working a program for the reasons I've previously mentioned. **Maybe there are core phases and optional/IDE-dependent phases; if this is true, I would like to know both.** 
