hawxgamer

Untitled

Nov 9th, 2015
149
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.41 KB | None | 0 0
  1. #include <iostream>
  2. #include <fstream>
  3.  
  4. int main()
  5. {
  6. fstream ofile;
  7.  
  8. ofile.open("/root/pxadev/rootfs_full/home/root/pxa27x_gpio.ko", ios_base::out | ios_base::in | ios_base::binary);
  9.  
  10. if(!ofile.is_open())
  11. {
  12. cerr<<" Could not open file!\n";
  13. }
  14.  
  15. char ch= '0x5';
  16. ofile.read(reinterpret_cast<char *>(&ch), sizeof(ch));
  17. ofile.write(reinterpret_cast<char *>(&ch), sizeof(ch));
  18.  
  19.  
  20. ofile.close();
  21.  
  22. return 0;
  23. }
Advertisement
Add Comment
Please, Sign In to add comment