标题:[求助]Cannot open include file: 'point.h': No such file or directory。 ...
只看楼主
sbivfh
Rank: 1
等 级:新手上路
帖 子:14
专家分:0
注 册:2007-1-2
 问题点数:0 回复次数:1 
[求助]Cannot open include file: 'point.h': No such file or directory。是什么

--------------------Configuration: Cpp1 - Win32 Debug--------------------
Compiling...
Cpp1.cpp
c:\documents and settings\administrator\my documents\microsoft visual v++ 6.0\cpp1.cpp(48) : fatal error C1083: Cannot open include file: 'point.h': No such file or directory
Error executing cl.exe.

Cpp1.exe - 1 error(s), 0 warning(s)

下面是程序:




#include <iostream.h>
#ifndef POINT
#define POINT
class point
{
int x,y;
public:
void set_xy(int a,int b)
{
x=a;
y=b;
}
int get_x()
{
cout<<x<<endl;
return x;
}
int get_y()
{
cout<<y<<endl;
return y;
}
};
#endif

//circle.h
#include <iostream.h>
#ifndef CIRCLE
#define CIRCLE
class circle:public point
{
int radius;
public:
void set_radius(int r)
{
radius=r;
}
int get_radius()
{
cout<<radius<<endl;
return radius;
}
};
#endif

//main
#include <iostream.h>
#include "point.h"
#include "circle.h"
int main()
{
point pt;
pt.set_xy(1,2);
pt.get_x();
pt.get_y();
circle cl;
cl.set_xy(3,4);
cl.set_radius(100);
cl.get_x();
cl.get_y();
cl.get_radius();
return 0;
}



包含*.h *.cpp 的程序该怎么编译啊,是分开编译吗,还是要另建项目呢
怎么才可以让这个程序编译成功啊。

搜索更多相关主题的帖子: directory Cannot point include file 
2007-01-02 15:39
清澂居士
Rank: 6Rank: 6
等 级:贵宾
威 望:28
帖 子:1237
专家分:7
注 册:2006-12-19
得分:0 

佛曰:\"前世的500次回眸才换来今生的一次擦肩而过\".我宁愿用来世的一次擦肩而过来换得今生的500次回眸.
2007-01-02 15:56



参与讨论请移步原网站贴子:https://bbs.bccn.net/thread-113724-1-1.html




关于我们 | 广告合作 | 编程中国 | 清除Cookies | TOP | 手机版

编程中国 版权所有,并保留所有权利。
Powered by Discuz, Processed in 0.243116 second(s), 8 queries.
Copyright©2004-2024, BCCN.NET, All Rights Reserved