Reading and Writing files in C++. Will the following segment of code read the name of a city?
ifstream inFile;
string city;
inFile.open("cities.txt");
cout << "Reading city name from the file.\n";
inFile >> city; // Read the city name from the file
a. true
b. false
No comments:
Post a Comment