Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

Instead of reading the information from the keyboard, create atext file (inData.

ID: 3615629 • Letter: I

Question

Instead of reading the information from the keyboard, create atext file (inData.txt) that contains the price and number oftickets sold data. Write your findings to the fileoutData.dat Will rate LIFESAVER if you can make this program for me andexplain how you get the text file to work into the program. Iam having a tough time getting my text files to work in and with myprograms. Thanks Instead of reading the information from the keyboard, create atext file (inData.txt) that contains the price and number oftickets sold data. Write your findings to the fileoutData.dat Will rate LIFESAVER if you can make this program for me andexplain how you get the text file to work into the program. Iam having a tough time getting my text files to work in and with myprograms. Thanks

Explanation / Answer

#include<fstream.h>
    int main()
    {
        char str[2000];
        fstreamfile_op("c:\inData.txt",ios::in);
        while(file_op >>str)
        cout <<str;
        file_op.close();
        return 0;
    }