im a inexperience person with C++ and i dont know how tooutput aset of informati
ID: 3609325 • Letter: I
Question
im a inexperience person with C++ and i dont know how tooutput aset of information into a file. i know after all theinformation is ready u open a file that you want to use and sendinformation there. by doing this.cpdatar.open(outfile.c_str());
if (cpdatar.is_open())
{cpdatar <<; // information goes there.
cpdatar << "";
cpdatar.close();
but how do you send the infomration if its just a bunch of loopsthat make a chart??
( look at the last code posted here)
Explanation / Answer
please rate - thanks this what your looking for? #include #include #include using namespace std; int main() { string fileMaterial,userMaterial; double a,b,c,d,minT,maxT,dh,ft,it; ifstream cpdata; cpdata.open("cpdata.txt"); //open file if (cpdata.is_open()) {coutuserMaterial; coutft; coutit; cpdata >> fileMaterial >> a >> b>> c >> d >> minT >> maxT; while (!cpdata.eof() ) {if(fileMaterial.compare(userMaterial) == 0) { dh=a*(ft-it)+(b/2)*(pow(ft,2)-pow(it,2))+(c/3)*(pow(ft,3)-pow(it,3))+(d/4)*(pow(ft,4)-pow(it,4)); coutRelated Questions
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.