// Ch. 11 Demo Program #1
// Mr. Minich

#include <iostream.h>
#include <fstream.h> // necessary for file I/O int main() { int secretNumber = 0; ifstream passwordFile; passwordFile.open("secret.txt"); // opens the file, secret.txt, for input

// the declaration statement,

//     ifstream passwordFile("secret.txt");

// could have been used instead
passwordFile >> secretNumber; cout << "The secret number is " << secretNumber << endl; return 0; }// end of main