Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <iostream>
- #include <string>
- #include <fstream>
- using namespace std;
- int main () {
- ifstream myFile;
- myFile.open("myTest.txt");
- int fileData;
- myFile >> fileData;
- int uAdd;
- cout << "Data From File: " << fileData << endl;
- cout << "Add to value: ";
- if(myFile.fail()){
- cerr << "File could not open!" << endl;
- }
- system("pause");
- return 0;
- }
Add Comment
Please, Sign In to add comment