Thank you: bleucoder for your help, I tried with yr suggestion but, i got an error :'struct std::ifstream' has no member named 'is_good' . This happened in line : while(inputFile.is_good()). Do i need another header file? Appreciate yr help again
I tried with the following header files,
//program to generate vertex for triangualtion of plate with hole
#include <iostream>
#include <math.h>
#include <fstream>
#include <vector>
#include <sstream>
#define PI 3.14159265
using namespace std;
int main()
{
vector<double> x1;
vector<double> y1;
vector<double> z1;
vector<double> x11;
vector<double> y11;
vector<double> z11;
double x,y,z,n,xx1,yy1,zz1;
string vertex;
string segment;
string radius;
double a,b,xa,ya,za,xb,yb,xc,yc,xd,yd,xe,ye,xf,yf,xg,yg,xh,yh,r;
//Read the file from
ifstream inputFile("plate-with-hole.txt");
ofstream outputFile("divided-plate-hole.txt");
stringstream str_seperator;
string line ;
while(inputFile.is_good())
{
getline( inputFile , line );
str_seperator<<line ;
str_seperator>>vertex>>x>>y>>z
if( vertex != "radius" )
{
x1.push_back(x);
y1.push_back(y);
z1.push_back(z);
}else if ( vertex == "segment")
{
xx1 = x ;
yy1 = y ;
zz1 = z ;