#include"stdafx.h" #include"getathickness.h" using namespace std; int getathickness(List<headtail>* pointlist,char* outputname) { ofstream fout(outputname,ios::out); if(!fout.is_open()) { char log_txt[512]; sprintf(log_txt, "Get A Thickness: cannot open file %s.", outputname); write_to_log(log_txt); return 1; } for(int i=pointlist->getNumber();i>=1;i--) { int thickness; thickness=pointlist->getWhich(i)->tail.y-pointlist->getWhich(i)->head.y; fout<<thickness<<endl; } fout.close(); return 0; }