disk043 - / / / / filename: author: modified: date:...

Info iconThis preview shows pages 1–2. Sign up to view the full content.

View Full Document Right Arrow Icon
// filename: disk043a.cpp // author: j. dzuback // modified: // date: 09/30/09 / /* **************************************** The program accesses a file located on a disk-like media. The user enters the path and file name information which the program repackages and delivers (back) to the operating system (Windows). **************************************** */ #include <iostream> #include <iomanip> #include <fstream> #include <string> # using namespace std; u int main() { char dish; int calorys; int totalCalories = 0; string fileNameIn; ifstream mealIn; cout << endl << "Enter the file name with extension & press enter: "; cin >> fileNameIn; mealIn.open(fileNameIn.c_str()); m // STUDENT -- You fill in the part needed to retrieve and display // the calories associated with each part of the meal. // Display the part of the meal M, V, or D and beside the part // display the calories. ie // M 550 cout << endl << endl << "The program will display the calories and " << endl; cout << "food elements from a meal, the data stored" << endl << "on a disk
Background image of page 1

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
Image of page 2
This is the end of the preview. Sign up to access the rest of the document.

Page1 / 2

disk043 - / / / / filename: author: modified: date:...

This preview shows document pages 1 - 2. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online