Yes... I have to save it to new file...

Like file1.txt is original file with some test.

and file2.txt.. will hold the hex dump..

But any one have idea how would I conver binary to hex. and then save it..

to save stuff to file.. I probably will have to use.. something like this...

Code:
	outData << ......;
	outData << ...........;
	outData << ...................;
	outData << ............;

	inData.close();
	outData.close();
But how do I use this code? to get Hex from nibbles...
(which was given for me in assignment...)
Code:
 }
unsigned char lower(unsigned char c)
{
	unsigned char one_byte;
	one_byte = c & 0x0F;
	return one_byte;
}
unsigned char upper(unsigned char c)
{
	unsigned char one_byte;
	one_byte = (c & 0xF0) >> 4;
	return one_byte;
}