#include<iostream>
#include<fstream>//文本读写头文件
#include<vector>//在C++标准模板库中的部分内容,它是一个多功能的,能够操作多种数据结构和算法的模板类和函数库。
#include<GL/glut.h>
using namespace std;
class MapPoint//声明一个名为MapPoint的类
{
public:
double longitude;//数据成员 经度
double latitude;//纬度
};
class Polygon
{
public:
vector<MapPoint>points; //多边形的顶点序列
};
vector<Polygon*> polys; //多边形集合
vector<Polygon*> ReadMapData(char* filename)//文件名
{
int PointCount;//计算点的个数
vector<Polygon*>polygons;
ifstream fs(filename);//寻找filename文件是否为空
while (fs.eof() != true)
#include<fstream>//文本读写头文件
#include<vector>//在C++标准模板库中的部分内容,它是一个多功能的,能够操作多种数据结构和算法的模板类和函数库。
#include<GL/glut.h>
using namespace std;
class MapPoint//声明一个名为MapPoint的类
{
public:
double longitude;//数据成员 经度
double latitude;//纬度
};
class Polygon
{
public:
vector<MapPoint>points; //多边形的顶点序列
};
vector<Polygon*> polys; //多边形集合
vector<Polygon*> ReadMapData(char* filename)//文件名
{
int PointCount;//计算点的个数
vector<Polygon*>polygons;
ifstream fs(filename);//寻找filename文件是否为空
while (fs.eof() != true)