I tried this

Code:
 #include <iostream>
#include <fstream>
#include <string>

using namespace std;

int main()
{

	string filename;
	ifstream inData;
	ofstream outData;
	cout << "Enter the input file name: ";
	cin >> filename;
	outData.open("name1.txt");
	
	ifstream inData(filename, ios::binary);
	if (!inData.is_open())
	{
	   cout << "Unable to open file: " << filename << endl;
	   return 1;
	}
	
	char buffer[1000];
	inData.read(buffer, sizeof(buffer));
}
for (int i=2*sizeof(int) - 1; i>=0; i--) 
   cout << "0123456789ABCDEF"[((n >> i*4) & 0xF)];
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;
}
But it don't compile..

What do I do wrong?