#include #include #include #include #include #include using namespace std; int main(int argc, char *argv[]) { ifstream bmp1; bmp1.open("hola.bmp"); filebuf *proBMP; proBMP = bmp1.rdbuf(); char * pBMP; // allocate memory to contain file data buffer=new char[size]; // get file data pbuf->sgetn (buffer,size); filestr.close(); // write content to stdout cout.write (buffer,size); char temp; bmp1 >> temp; assert(temp == 'B'); bmp1 >> temp; assert(temp == 'M'); int tam; bmp1 >> tam; assert(tam > 58); system("PAUSE"); return EXIT_SUCCESS; }