Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include<iostream>
- #include<fstream>
- using namespace std;
- int main(){
- ifstream subor;
- subor.open("Graf.txt");
- if (subor.fail()){
- cerr << "Subor sa nepodarilo otvorit";
- exit(1);
- }
- int first;
- int second;
- while (!subor.eof()){
- subor >> first;
- subor >> second;
- cout<<first<<" -> "<<second<<endl;
- }
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement