I want store approximate pi number from "approximate" file and use it afterwards, somehow it getting deleted and i can't print it after close method. Here's how i tried to.
string pi;
ifstream piFile;
piFile.open("pi_approximate");
while(piFile){
getline(piFile,pi);
}
piFile.close();
cout << pi << endl;