Advertisement
Guest User

ne radi

a guest
Apr 4th, 2020
522
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.53 KB | None | 0 0
  1. #include <iostream>
  2. #include <fstream>
  3. #include <vector>
  4.  
  5. using namespace std;
  6.  
  7.  
  8. int main(int argc, char* argv[])
  9. {
  10.     string fileName= argv[1];
  11.     cout<<argv[1]<<endl;
  12.  
  13.     char *buffer = new char[256];
  14.     string outputfile=argv[3];
  15.  
  16.     ifstream myFile(fileName, ios::in| ios::binary);
  17.  
  18.     while(!myFile.eof())
  19.     {
  20.  
  21.         myFile.read(buffer,256);
  22.  
  23.  
  24.         if(!myFile)
  25.         {
  26.             cout<<"Greska pri argumentima komandne linije, nije otvoren fajl"<<endl;
  27.         }
  28.  
  29.  
  30.     }
  31.  
  32.  
  33.     return 0;
  34. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement