Advertisement
EternalMugen

Untitled

Apr 6th, 2020
176
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.40 KB | None | 0 0
  1. #include <iostream>
  2. #include <string>
  3. #include <fstream>
  4.  
  5. int main()
  6. {
  7.     int a;
  8.     short i;
  9.     //std::cout<<"Enter number: "<<std::flush;
  10.     //std::cin >> a;
  11.  
  12.     std::ifstream f("binary.txt", std::ios::binary);
  13.     while (f.eof())
  14.     {
  15.         f.read((char *)&i, sizeof(short));
  16.         std::cout << i*3 << std::endl;
  17.         //std::cout << a << std::endl;
  18.     }
  19.     f.close();
  20. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement