我刚学c++,写了下面这几行,结果出错了
#include<iostream>
using namespace std;
int main()
{
//好家伙,这是一行注释!
int a = 10;
//下面两个是常量
const int b = 5;
//define后头不加分号
#define Cc 20
cout << "this should be 10" << a << endl;
cout << "this isn't changeable" << b << endl;
cout << "this is another constant value" << Cc <<endl;
return 0;
}
我在树莓派上用vscode直接f5跑的,报错如下:
Breakpoint 1, main () at /home/freeman/Desktop/test.cpp:14
14 int a = 10;
Loaded '/lib/aarch64-linux-gnu/libstdc++.so.6'. Symbols loaded.
Loaded '/lib/aarch64-linux-gnu/libc.so.6'. Symbols loaded.
Loaded '/lib/aarch64-linux-gnu/libm.so.6'. Symbols loaded.
Loaded '/lib/aarch64-linux-gnu/libgcc_s.so.1'. Symbols loaded.
[Inferior 1 (process 20718) exited normally]
The program '/home/freeman/Desktop/test' has exited with code 0 (0x00000000).
我该如何解决?我哪里出了错?