TheSamuraiElephant
Joined: 04 Aug 2005 Posts: 17
|
Posted: Tue Sep 13, 2005 1:42 am Post subject: problem with my sceIoOpen code... |
|
|
I'm getting the error "passing argument 2 of 'sceIoRead' makes pointer from integer without a cast" back from cygwin about the following bit of code:
| Code: | //open file and start reading
fdin = sceIoOpen(filename, PSP_O_RDONLY, 0777);
if(fdin >= 0)
{
printf("File opened %s\n", filename);
char ID[2];
unsigned int chunksize = 1;
int bytes_read = 1;
bytes_read = sceIoRead(fdin, ID, sizeof(ID));
printf("Number of read bytes: %i\n", bytes_read);
printf("ID: %s\n", ID);
bytes_read = sceIoRead(fdin, chunksize, sizeof(chunksize));
printf("Number of read bytes: %i\n", bytes_read);
printf("ID: %i\n", chunksize);
}
else
{
printf("Couldn't open %s\n", filename);
}
|
I basically just want to read 2 bytes into "ID" and display these 2 bytes as 2 char's and then read 4 bytes into "chunksize" and display as an integer.
I'm kind of a newbie, so apologies for asking such a newbie question.
Any help would be appreciated,
Cheers. |
|