recover jpeg from .raw file
Hello everyone, I am working on a c program which recovers jpeg files from .raw file of a memory card.My code is here-
Code:
#include<stdio.h>
#include<stdlib.h>
int main(void)
{
File* inptr=fopen("card.raw","r")
if(inptr==NULL)
{
return 1;
}
File* outptr;
int count=0;
char filename[8];
char buffer[]=(sizeof(char)*512);
while(!feof(inptr))
{
fread(&buffer,sizeof(char)*512,1,inptr);
if(fread(&buffer,sizeof(char)*512,1,inptr)==0)
break;
if(buffer[0] == 0xff && buffer[1] == 0xd8 && buffer[2] == 0xff && ((buffer[3] == 0xe0)||(buffer[3] == 0xe1)))
{
if (count! =0)
fclose(outptr);
sprintf(filename,"%03d.jpg",count++);
outptr=fopen(filename,"w");
}
if(fwrite(&buffer,sizeof(char),512,outptr)!=0)
fwrite(&buffer,sizeof(char),512,outptr);
}
fclose(outptr);
fclose(inptr);
return 0;
}
But while compiling it I get this error-
Makefile:2: *** missing separator. Stop.
Could anyone please help me to fix this problem?