有关error:was not decleared in this scope
来源:互联网 发布:基调网络 编辑:程序博客网 时间:2024/05/13 14:29
a.变量、函数、或者类未声明或者定义。
(一定注意大小写什么的!)
b.头文件相互#include时,导致了依赖关系错误。比如,头文件形成了一个环形依赖,
/***file a ****/
#ifndef FILE_A_
#define FILE_A_
#include <file b>
#endif
/****file b ***/
#ifndef FILE_B_
#define FILE_B_
#include <file a>
#endif
如果在file b中用到了file a中的变量、函数、类,那么由于#ifndef和#define的作用,file b中的#include <file a>语句将失去效果。
c.在给头文件起名字的时候不小心和某个库中的头文件重名了,而在程序中又用来了这个库的这个头文件。这样, #ifndef XXXX 和 #ifndef XXXX中的宏重名了,自己写的头文件就失去了效果。
转载自:http://yaycici.blog.163.com/blog/static/173759063201272942930431/
从别人博客上转载的,以后自己也会再添加。
刚刚有一个错误,以为是头文件或者是定义关键字上的问题,找了一下发现都不是……其实就是数组的开的太大了,一个二维的数组开到十万。
0 0
- 有关error:was not decleared in this scope
- error: '_localtime_not_threadsafe_' was not declared in this scope
- error: ‘exit’ was not declared in this scope
- error: `cout' was not declared in this scope
- error: 'UINT64_C' was not declared in this scope
- error: 'memcpy' was not declared in this scope
- error: 'memcpy' was not declared in this scope的解决
- error: ‘BYTE’ was not declared in this scope
- error: ‘closesocket’ was not declared in this scope
- error:inet_addr() was not declared in this scope
- error: ‘exit’ was not declared in this scope 的解决方法
- 关于error: ‘htons’ was not declared in this scope
- error: ‘memcpy’ was not declared in this scope 解决
- error: ‘alarm’ was not declared in this scope 解决
- error: ‘ostream_iterator’ was not declared in this scope
- error: 'glGenFramebuffersOES' was not declared in this scope
- error: 'LOGE' was not declared in this scope
- error: 'ff_get_buffer' was not declared in this scope
- 保存Bitmap到SD卡
- 《Windows核心编程》---文件操作
- 线段树(单点更新,区间求最大值)
- 最短路问题
- 怎样查找一个板子的 配置文件 例如 s5pv210 芯片
- 有关error:was not decleared in this scope
- [c++]为什么可以在基类中实现纯虚函数
- IE6 浏览器常见兼容问题 大汇总(23个)
- Three.js 教程和示例(Tutorials and Examples)
- linux 文件系统
- 有关编译过程中的error
- hdu 1263 水果 (二维map)
- UVa 10003Cutting Sticks
- POJ 3119 Friends or Enemies? (模拟一遍,函数的魅力)