Advertisement
Guest User

Untitled

a guest
Nov 28th, 2014
182
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.58 KB | None | 0 0
  1. #include <iostream>
  2. #include <fstream>
  3. #include <bitset>
  4. #include <C:\Users\pol\Documents\Visual Studio 2010\Projects\Hello World\boost\utility\binary.hpp>
  5.  
  6. using namespace std;
  7.  
  8. int main(){
  9. unsigned short bin = BOOST_BINARY(0111 0001);
  10.  
  11. ifstream b; b.open("C:\\Users\\pol\\Desktop\\test.exe", ios::binary | ios::out | ios::ate);
  12. if(b.is_open()){cout << "File Opened.";}else{cout << "Failed to open file.";}
  13.  
  14. //b.seekg(0, ios::end);
  15. int endByte = b.tellg();
  16. printf("\nFile is %i bytes long.", int(b.tellg())); //Tells us position of stream.
  17.  
  18.  
  19. char* p = "";
  20. cin >> p ;
  21. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement