(.text+0x24): undefined reference to `add(int, int)'collect2.exe: error: ld returned 1 exit status
在使用vscode进行C++分文件编写的时候为什么会报上面那个错位错误啊
函数只要声明一次就好了,由于函数已经在头文件声明过了,所以不需要再main函数前面再次声明.
add(int, int) 函数的定义要写在前面