Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include "assign2_part1.h"
- #include <iostream>
- #include <fstream>
- #include <stdio.h>
- #include <bitset>
- using namespace std;
- Assign2_part1::Assign2_part1() {
- getline(cin,str);
- cstr = str.c_str();
- ifstream fileopen(cstr);
- string ricky;
- ricky = str.substr(0,str.size()-3)+"hack";
- ofstream outfile(cstr);
- while(getline(fileopen,str)) {
- if(true) {
- str=str.substr(1,str.length()-1);
- for(size_t i = 0; i < str.size(); i++) {
- cout << str.size();
- // outfile << "000000000000"
- outfile << bitset<16>(str[i]) << endl;
- // outfile << "test";
- // cout << "000000000000"
- // cout << bitset<4>(str[i]) << endl;
- }
- }
- }
- outfile.close();
- }
- Assign2_part1::~Assign2_part1() {
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement