are u know about how to convert 3D pointer to 1D pointer. Please send reply.
1. For the codes about fread, fopen and fwrite, to make it executable in MSVC++, should I place it inside a cpp file like this and put the bat file under the same folder of cpp file? I failed to do that in MSVC++.
#include <stdio.h>
using namespace std;
int main () {
// the block of codes you mentioned
}
2. I am quite confused of what template I should choose in New Project in such occasion? MFC Application or Win32 Project?
3. Do you mean the 2D array assignment like this?
#define WIDTH 5
#define HEIGHT 3
int Tommy [HEIGHT][WIDTH];
int n,m;
int main ()
{
for (n=0;n<HEIGHT;n++)
for (m=0;m<WIDTH;m++)
{
jimmy[n][m]=(n+1)*(m+1);
}
return 0;
}
whats the type of image you are to open it may differ respect to types
Actually, what I am doing is to read in a binary image file, say jpg, bmp, etc. for later processing. Or simply a file created by notepad filled with 1 & 0.