Electrical and Computer Engineering
19 of 23
UAH
CPE 112
Problem Solving Implementation
•    cout << fixed << showpoint    // Set up floating pt.
•         << setprecision(2);     //   output format
•
•    // Separately count females and males, and sum incomes
•
•    // Initialize ending condition
•    cout << "Name of the income data file: ";
•    cin >> fileName;
•    incFile.open(fileName.c_str());  // Open input file
•                                     // and verify attempt
•    if ( !incFile )
•    {
•       cout << "** Can't open input file **" << endl;
•       return 1;
•    }