hi all,
my input file is an hexdecimal file, which is made by winhex.
how can my c++ read from it and how can i deal with it.
any links or tutorials will b helpfull
thanks
hi all,
my input file is an hexdecimal file, which is made by winhex.
how can my c++ read from it and how can i deal with it.
any links or tutorials will b helpfull
thanks
Open the file in binary mode
Then read as many bytes as you want
int main ( ) {
char buff[2];
ifstream foo("a.exe",ios::binary);
foo.read( buff, 2 );
cout << buff[0] << buff[1] << endl;
return 0;
}
We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.