#include<bits/stdc++.h>
using namespace std;
int main ()
{
for(int i=0; i<256; i++)
{
fstream file("compress.bin", ios:: binary | ios::in | ios::out | ios:: trunc);
char c=i;
file.write((char *)&c,sizeof(c));
file.seekg(0);
unsigned char p;
file.read((char *)&p,sizeof(c));
cout << p ;
printf(" %d\n",p);
}
}
No comments:
Post a Comment