特牛网址导航

C/C++ 编译报错 printf was not declared in this scope_printf' was not declared in this scope-CSDN博客

网友收藏
文章浏览阅读6.1w次,点赞25次,收藏19次。报错: 'printf' was not declared in this scope原因是这个 printf 函数需要头文件 "stdio",但是程序中没写,解决办法是在头文件中加入此头文件。C语言加入 include<stdio.h>C++加入 include<cstdio>..._printf' was not declared in this scope