g++ error: ‘printf’ was not declared in this scope

版权声明:本文为博主原创文章,未经博主允许不得转载。 https://blog.csdn.net/u010412858/article/details/81212652

由于“printf”是C语言的打印方法,所以在g++编译器下需要引用头文件#include <stdio.h>
或者将printf换成c++中cout打印方法

同理:

error: ‘nullptr’ was not declared in this scope

猜你喜欢

转载自blog.csdn.net/u010412858/article/details/81212652
今日推荐