Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include<iostream>
- #include<fstream>
- #include<iomanip>
- #include<sstream>
- using namespace std;
- int main(int argc, char** argv)
- {
- if(argc!=2)
- {
- fprintf(stderr,"Usage: %s\n(1)Input_filename\n",argv[0]);
- exit(1);
- }
- ifstream ifs(argv[1]);
- string line;
- while(getline(ifs,line))
- {
- int a,b;
- istringstream is(line);
- is >> a
- >> b;
- cout<< a <<" "<< b <<endl;
- }
- ifs.close();
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment