// AntColony.cpp : 定义控制台应用程序的入口点。 // #include<iostream> #include<math.h> #include<time.h> #include<stdio.h> #include <fstream> #include <string> #include <iostream> #include <vector> using namespace std; #include <fstream> #include <sstream> //使用stringstream需要引入这个头文件 //打印系列 //GD-E-B-AC-HF-FG-EGJ-DI-CIJ //孔坐标 double HoleA[660][2] = { (0, 0) }; double HoleB[788][2] = { (0, 0) }; double HoleC[270][2] = { (0, 0) }; double HoleD[212][2] = { (0, 0) }; double HoleE[95][2] = { (0, 0) }; double HoleF[34][2] = { (0, 0) }; double HoleG[20][2] = { (0, 0) }; double HoleH[6][2] = { (0, 0) }; double HoleI[10][2] = { (0, 0) }; double HoleJ[28][2] = { (0, 0) }; int N = 0; int L_n = 0; double Hole[1500][2] = { (0, 0) }; double holeLength = 0; //定义数组长度。 int HoleLength[11] = { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 }; //记录读入数组的长度 //从1-10,分别对应A,B-到-J //double C[N][2] = {0 }; struct Point { int x; int y; }; FILE *fp; char buf[256]; char *p; char X[10] = { '