#include<bits/stdc++.h>
using namespace std;
int main()
{
ifstream myfile ("compress.bin", ios::binary);
for(int i=0; i<256; i++)
{
unsigned char c ;
myfile.seekg(i);//position of the character in the file
myfile.read ((char*)&c, sizeof (c));
cout << c;
}
cout << endl;
return 0;
}
using namespace std;
int main()
{
ifstream myfile ("compress.bin", ios::binary);
for(int i=0; i<256; i++)
{
unsigned char c ;
myfile.seekg(i);//position of the character in the file
myfile.read ((char*)&c, sizeof (c));
cout << c;
}
cout << endl;
return 0;
}
No comments:
Post a Comment