This is probably a very discussed question, but I still fail to understand the mechanics:
How do I add 512 to the address of an array?
Here's the situation:
char buffer[512];
readSector(buffer,2);
/*somewhere in here i must increment address of buffer by 512*/
readSector(buffer,3);
printString(buffer);
readSector takes in the buffer array, and dumps the contents of sector 2 of the disk in it. Then readSector is called again in order to have the contents of sector 3 dropped in buffer. printString just prints the contents of the buffer to the screen.
My professor explains that every time I call readSector I should increment the address of buffer by 512. How do i go about doing this? Again, sorry if this is a blatantly obvious question or if it has been asked before. Thanks!