Understanding C ++ compilers from a Java / C # perspective

I am a moderately experienced Java / C # programmer, and I recently started learning C ++. The problem is that it’s hard for me to understand how to structure the various header and code files. This is mainly due to the fact that I do not understand how the compiler binds everything together. I tried to read some tutorials, but my preconceptions are very colored due to knowledge of Java and C #. For example, I can hardly come to the conclusion that methods and the like can be defined in the namespace, and not just in the class definition.

I found many C ++ → Java / C # tutorials, but practically nothing went the other way. Are there any good resources to facilitate the transition to Java / C # → C ++, especially regarding understanding the compilation process?

+5
source share
4 answers

The C ++ FAQ is an excellent resource about all the features of C ++, but it is probably a little more advanced than you are looking for. - Most questions (not just answers) are secrets even for fairly experienced C ++ developers.

, google ++, - . (, , , ), C ++ , . , , Java.

, , , .

cpp - " ". Java , , . ++ cpp ( , ).

( , , ). #include - , #include. , , - cpp. , , . ++ , , , , ... , , , . - , , .

++ - , ( , ), , . , "" , , .

, , . , , , , this, . , ( , , - , , ), . , , - .

, , , , , , , ... , . , .

+4

, C. .

, .cpp . , #include. , foo.h, #include "foo.h".

? , .cpp . , . . , ( ).

+4

++ C. . C. - -, .

C Java/# , . , Java , . , , .

C , , "". , ( ), , . , , - C , , ( , ). , , , . , " ". , , , .

+1

, , ( , , , ).

, ( ) . - , , , , - . , , , .

+1

All Articles