头文件已包含,也已放到了目录下但为什么还提示No such file or directory???

hiyoung 2008-06-01 09:36:28
程序如下所示:

#ifndef STASH2_H
#define STASH2_H
#include"Mem.h"////////////////////////////////

class Stash2 {
int size; //size of each space
int quantity; //number of storage spaces
int next;
//dynamically allocated array of bytes:
unsigned char* storage;
void inflate(int increase);
Mem* buff;////////////////////////////////
public :
// Stash(int size);
Stash(int size,int initQuantity = 0);
~Stash();
int add(void* element);
void* fetch(int index);
int count();
};

#endif //STASH2_H

程序编译时出现:fatal error C1083: Cannot open include file: 'Mem.h': No such file or directory,但我已经把这个头文件拷到工作目录里了呀,为什么还会出现这个问题呀??是不是编译器的问题??我的是VC++6.0。
...全文
1361 2 打赏 收藏 转发到动态 举报
写回复
用AI写文章
2 条回复
切换为时间正序
请发表友善的回复…
发表回复
hiyoung 2008-06-01
  • 打赏
  • 举报
回复
我是从source file & header file那里添加文件进来的,之后又拷到当前工程目录下,这样应该是添加到工程了吧???怎么还是不行呢?
zzhprogram 2008-06-01
  • 打赏
  • 举报
回复
记得添加到工程,磁盘文件存在没有包含也是无效的

64,654

社区成员

发帖
与我相关
我的任务
社区描述
C++ 语言相关问题讨论,技术干货分享,前沿动态等
c++ 技术论坛(原bbs)
社区管理员
  • C++ 语言社区
  • encoderlee
  • paschen
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
  1. 请不要发布与C++技术无关的贴子
  2. 请不要发布与技术无关的招聘、广告的帖子
  3. 请尽可能的描述清楚你的问题,如果涉及到代码请尽可能的格式化一下

试试用AI创作助手写篇文章吧