首页 > IT职业 > IT图书 > 网点数据类型转换为中转型EXCLE格式
#include
#include
#include
int main()
{
//=====================================================
//基本数据
const int startlon = 9755;//起始经度(97.55*100)
const int startlat = 3995;//起始纬度
const int xrolls = 2; //行数
const int yrolls = 4;//列数
const int step = 10;//步长(0.1*100)
const int filenumber = 3;//文件总个数
float data[xrolls][yrolls];
//======================================================
//文件操作
char infilename[100];
FILE* fout,*fin;
fout = fopen("F:\2017C\test.txt", "a+");
int dlon, dlat;
//对纬度,对经度循环
for (dlat = 0; dlat 1.11 2.22 3.33 4.44
5.55 6.66 7.77 8.88
//testx.txt //lon lat Jan Feb Mar............
97.55 39.95 0.00 1.11 3.11
97.65 39.95 1.00 1.22 3.22
97.75 39.95 2.00 1.33 3.33
97.85 39.95 3.00 1.44 3.44
97.55 40.05 4.00 2.11 3.55
97.65 40.05 5.00 2.22 3.66
97.75 40.05 6.00 2.33 3.77
97.85 40.05 7.00 2.44 3.88
//test.txt
来自 “ ITPUB博客 ” ,链接:https://blog.itpub.net/3368/viewspace-2798632/ ,如需转载,请注明出处,否则将追究法律责任。