1234567891011121314
#include <iostream> #include <fstream> using namespace std; int main() { ifstream inFile("filename.txt"); int x; inFile >> x; cout << "The integer from file is: " << x << endl; }