Hi, I'm trying to use an array to hold some information from a file. Here is my code.
byte * buffer[30];
for(int j=0;j<30;i++)
{
buffer[j]=(byte *)malloc(518400);
}
//then i open a file-this part has no problems
ReadFile(videoYUV,buffer[1],518400,&bytesread,&gOverLapped);
The read in part fails. But when I use a regular pointer (i.e byte * buffer=(byte *) malloc(518400) )it works. I was wandering if i'm passing in the pointer wrong or something. Please help me out. Thanks in advance.
byte * buffer[30];
for(int j=0;j<30;i++)
{
buffer[j]=(byte *)malloc(518400);
}
//then i open a file-this part has no problems
ReadFile(videoYUV,buffer[1],518400,&bytesread,&gOverLapped);
The read in part fails. But when I use a regular pointer (i.e byte * buffer=(byte *) malloc(518400) )it works. I was wandering if i'm passing in the pointer wrong or something. Please help me out. Thanks in advance.