Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- while (!fin1.eof()){
- store = 0;
- for (int j = 0; j < N; j++){
- if (!fin1.eof()){
- fin1 >> a[j];
- cout <<"a: " << a[j] << " ";
- n1++;
- cout << "n1:"<< n1 << " ";
- }
- else {
- a[j] = 0;
- }
- }
- for (int j = 0; j < N; j++) {
- highBit = a[j] & 128;
- //cout << "highBit: " << highBit << " ";
- a[j] = a[j] & 127;
- //cout << "a: " << a[j] << " ";
- highBit = highBit >> 7;
- //cout << "highBit: " << highBit << " ";
- store = store << 1;
- //cout << "store: " << store << " ";
- store = store | highBit;
- //cout << "store: " << store << " ";
- fout1 << a[j];
- //cout << "a[j]: "<< a[j] << endl;
- }
- fout1 << store;
- }
Add Comment
Please, Sign In to add comment