All pastes #828829 Raw Edit

Anonymous

public text v1 · immutable
#828829 ·published 2007-12-22 19:28 UTC
rendered paste body
#include "grid.h"
#include <iostream>
#include <fstream>
#include <iomanip>



using namespace std;

void openfile(fstream& input);
void closefile(fstream& input);


int main()
{

fstream inputimg;
char bytebuffer;
char buffer[8];
int a = 0;

openfile(inputimg);

inputimg.seekg(0, ios::beg);

while(a < 30)
{
	
inputimg.get(&bytebuffer, 1);
cout << hex << static_cast<int>(bytebuffer);
a++;
}

cout << hex << 0xff << endl;

Grid newGrid(40, 40);
newGrid.SetGrid();


closefile(inputimg);



return 0;

}


void openfile(fstream& input)
{
	input.open("c:/test.bmp", ios::binary | ios::in);
	if(!input.is_open())
	{
		cout << "failed to open input file!" << endl;
	}

}

void closefile(fstream& input)
{
	input.close();
}