include <iostream> include "ccc_x11.h" include "ccc_shap.h" include "ccc_win.h" include <fstream> using namespace std ; int ccc_win_main() { cwin.coord(-10, -10, 10, 10); // initiating variables for the first input file double x1_1, x2_1, x3_1, x4_1, x5_1, x6_1, x7_1, x8_1, x9_1, x10_1, x11_1, x12_1, x13_1; double y1_1, y2_1, y3_1, y4_1, y5_1, y6_1, y7_1, y8_1, y9_1, y10_1, y11_1, y12_1, y13_1; ifstream fin("input_1.txt"); //assigning numbers from first file to variables fin >> x1_1 >> x2_1 >> x3_1 >> x4_1 >> x5_1 >> x6_1 >> x7_1 >> x8_1 >> x9_1 >> x10_1 >> x11_1 >> x12_1 >> x13_1 >> y1_1 >> y2_1 >> y3_1 >> y4_1 >> y5_1 >> y6_1 >> y7_1 >> y8_1 >> y9_1 >> y10_1 >> y11_1 >> y12_1 >> y13_1; //Now creating points from the inputs from the first file Point p1_1 (x1_1 , y1_1); Point p2_1 (x2_1 , y2_1); Point p3_1 (x3_1 , y3_1); Point p4_1 (x4_1 , y4_1); Point p5_1 (x5_1 , y5_1); Point p6_1 (x6_1 , y6_1); Point p7_1 (x7_1 , y7_1); Point p8_1 (x8_1 , y8_1); Point p9_1 (x9_1 , y9_1); Point p10_1 (x10_1 , y10_1); Point p11_1 (x11_1 , y11_1); Point p12_1 (x12_1 , y12_1); Point p13_1 (x13_1 , y13_1); // creating lines from file one Line L1_1(p1_1 , p2_1); Line L2_1(p2_1 , p3_1); Line L3_1(p3_1 , p4_1); Line L4_1(p4_1 , p5_1); Line L5_1(p5_1 , p6_1); Line L6_1(p6_1 , p7_1); Line L7_1(p7_1 , p8_1); Line L8_1(p8_1 , p9_1); Line L9_1(p9_1 , p10_1); Line L10_1(p10_1 , p11_1); Line L11_1(p11_1 , p12_1); Line L12_1(p12_1 , p13_1); //displaying lines from the first file cwin << L1_1 << L2_1 << L3_1 << L4_1 << L5_1 << L6_1 << L7_1 << L8_1 << L9_1 << L10_1 << L11_1 << L12_1; //closing and clearing the first file fin.close(); fin.clear(); |