Hello guys. I am pretty much a beginner in C++ programmer. Somewhere, I heard that C++ compiler do the job of converting the the code into assembly language to produce an object. I am not arguing that C++ isn't portable, I know there is a reason. What I mean is since assembly language are machine specific how in the earth, is C++ portable?
The compiler can compile the code to any assembly language not just one. So a program can be written once, then compiled multiple times... one for each target machine it wants to run on.
There is a difference between "in most cases" and "in extreme/rare cases". There are a lot of things that are allowed to happen that generally don't happen. Computerquip s referring to an extreme/rare case.
While it is rare (if a case exists at all), it's good to keep in mind. It's false to say that a C/++ compiler must compile into assembly or machine code, contrary to what some tutorials lead you to believe!