由于“printf”是C语言的打印方法,所以在g++编译器下需要引用头文件#include <stdio.h>
或者将printf换成c++中cout
打印方法
同理:
error: ‘nullptr’ was not declared in this scope
由于“printf”是C语言的打印方法,所以在g++编译器下需要引用头文件#include <stdio.h>
或者将printf换成c++中cout
打印方法
同理:
error: ‘nullptr’ was not declared in this scope