注册 登录
编程论坛 C++教室

请教一个简单的问题

magicypj 发布于 2007-09-16 20:11, 508 次点击
#ifndef COORDIN_H_
#define COORDIN_H_
struct polar
{
double distance;
double angle;
};
struct rect
{
double x;
double y;
};
polar rect_to_polar(rect xypos);
void show_polar(polar dapos);
#endif
#include<iostream.h>
#include "coordin.h"
using namespace std;
int main()
{
rect rplace;
polar pplace;
cout<<"Enter the x and y values:";
while(cin>>rplace.x>>rplace.y)
{
pplace=rect_to_polar(rplace);
show_polar(pplace);
cout<<"Next two number(q to quit):";
}
cout<<"Bye!\n";
return 0;
}fatal error C1083: Cannot open include file: 'coordin.h': No such file or directory请教一下
4 回复
#2
maoguoqing2007-09-16 20:14
把这行using namespace std;
或者把iostream.h的.h去掉先
#3
magicypj2007-09-16 20:19

还是编译不过

#4
maoguoqing2007-09-16 20:20
再看你是否有coordin.h这个文件
#5
xiaoMa_YZ2007-09-17 15:05
#include "stdafx.h"
#include <iostream>
#include "coordin.h"
using namespace std;
1