0%

Welcome-to-C++

code ==> compiler ==> produces mechine code for your target platform(为目标平台生成机器代码)

mechine code then contains the actual instructions that the target CPU can execute。(机器代码包含目标CPU可以执行的指令)

所以使用C++是可以单独控制目标CPU每条指令。

How C++ Works

1
2
3
4
5
6
7
8
9
10
#include <iostream>
using namespace std;

int main() {
int num = 42;
cout << "Hello, World!" << endl;
cout << "The value of num is: " << num << endl;
return 0;
}

1
#include <iostream>

C++中的#符号通常被用于预处理器指令,这些指令在编译实际的C++代码之前被执行
#include <该文件的所有内容> ==
include will look for a file and will simply take the entire contents of the iostream file and paste it into our main.cpp.

Once preprocessing is finished,our file will be complied,