i have a problem with my code.
void readSis(string sisName) {
ifstream infile(sisName.c_str());
Data platform;
// todo: split tiap =
platform.N = atof(readInputLine(infile).c_str());
platform.Ti = atof(readInputLine(infile).c_str());
platform.SIL = atof(readInputLine(infile).c_str());
// save Ti
ostringstream temp;
temp << platform.Ti;
Ti = temp.str();
// save SIL
ostringstream temp1;
temp1 << platform.SIL;
// calling prism function
cout << "Calling PRISM Software in C:Program Files/prism-4.3.1/bin/prism" << endl;
cout << "Executing model and properties......" << endl;
cout << "Please wait for some moments......" << endl;
callPrismBat();
// calling readtxt function
cout << "Processing PFD.txt...." << endl;
readtxt("PFD.txt");
cout << "SIL calculation has been done in file SILCalc.SIS" << endl << endl;
}
my code is created to read the input of a file with .sis extension. there are 3 variable that i want to get : N, Ti and SIL. My problem is, i want to save the value from platform.SIL
with temp1
(variable) and store temp1
as an integer value because i want to make an operation from the value. can anybody help me?
thank you