1-I am reading the bitmap file
2-Order the new aux file
In step 2 is where i got the problem,i can't read the same!! Please,could anyone tell me what the hell i am doing wrong???
Code:
#include<iostream>
#include<stdio.h>
#include<stdlib.h>
#include<string.h>
#include <fstream>
#define MAXW 1024
#define MAXH 1024
using namespace std;
void loadBMP(char* infile,char* outfile);
void putOrder(char* infile);
int numberOflines(char* infile);
int main (int argc, char* argv[] ) {
int BMPw;
int BMPh;
loadBMP(argv[1], argv[2]);
putOrder(argv[2]);
return 0;
}
void loadBMP(char* infile,char* outfile) {
ifstream in ;
ofstream out;
int width;
int height;
//Open File
in.open(infile);
out.open(outfile);
in.seekg(54,ios::beg);
while(!in.eof()){
out << in.get() << endl;
}
in.close();
out.close();
}
void putOrder(char* infile){
ifstream inf;
ofstream outf;
int nLines;
string t;
inf.open(infile);
outf.open("outOrder");
inf.seekg(10,ios::beg);
while (!inf.eof()){
outf << inf.get() << endl;
}
inf.close();
outf.close();
}
