kvarnerexpress 0 Report post Posted October 2, 2005 I am writing a program that needs to read/write to blocks on a floppy disk. I am using two functions (written by someone else) that are defined as follows:Code: int WriteBlock(int index, BYTE *buffer, int count);int ReadBlock(int index, BYTE *buffer, int count); I am making a call to ReadBlock() as follows:Code:BYTE record_stream[512];ReadBlock(some_index,&record_stream,1); My problem is that when I compile I get the following error:Code:no matching function for call to `disk::ReadBlock(int, BYTE (*)[512], int)'candidates are: int disk::ReadBlock(int, BYTE*, int) Not having very much experience with BYTE streams I am just treating them like char arrays. My questions are:1-Am I right to think of BYTE arrays as being similar to char arrays?2-(more importantly)How am I supposed to properly send in a BYTE array to this function? Do I need to create the BYTE array on the heap possibly?Anyways, thanks in advance for any help.kvarnerexpress Share this post Link to post Share on other sites
SystemWisdom 0 Report post Posted October 3, 2005 Try to remember that arrays are pointers already, and thus you shouldn't need to pass the address of your variable to the function..Try something like: BYTE record_stream[512];ReadBlock(some_index, record_stream, 1); I hope that helps a bit.. Share this post Link to post Share on other sites
dul 0 Report post Posted October 4, 2005 BYTE record_stream[512];ReadBlock(some_index,&record_stream,1); Bur record_stream must be record_stream[255] try. Byte's maximum size is 255. I mean You can not use longer than 255 Length. Good luck Share this post Link to post Share on other sites