Advertisement
Guest User

Untitled

a guest
May 23rd, 2018
62
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.75 KB | None | 0 0
  1. #include "assign2_part1.h"
  2. #include <iostream>
  3. #include <fstream>
  4. #include <stdio.h>
  5. #include <bitset>
  6.  
  7.  
  8. using namespace std;
  9.  
  10. Assign2_part1::Assign2_part1() {
  11. getline(cin,str);
  12. cstr = str.c_str();
  13.  
  14. ifstream fileopen(cstr);
  15. string ricky;
  16.  
  17. ricky = str.substr(0,str.size()-3)+"hack";
  18.  
  19.  
  20.  
  21. ofstream outfile(cstr);
  22.  
  23. while(getline(fileopen,str)) {
  24. if(true) {
  25. str=str.substr(1,str.length()-1);
  26.  
  27. for(size_t i = 0; i < str.size(); i++) {
  28. cout << str.size();
  29. // outfile << "000000000000"
  30. outfile << bitset<16>(str[i]) << endl;
  31. // outfile << "test";
  32. // cout << "000000000000"
  33. // cout << bitset<4>(str[i]) << endl;
  34. }
  35. }
  36. }
  37. outfile.close();
  38.  
  39.  
  40.  
  41. }
  42.  
  43. Assign2_part1::~Assign2_part1() {
  44.  
  45. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement