#include #include // for file I/O using namespace std; int main() { ifstream infile; // input file stream variable int x, y; char letter; infile.open("input.txt"); // attach the variable infile with the // physical file "input.txt" infile >> x >> letter >> y; // read x, letter and y from the input file cout << "the data read is: " << x <<" " << letter << " " << y << endl; // read some more data infile >> x >> letter >> y; cout << "the data read is: " << x <<" " << letter << " " << y << endl; return 0; }