Hi...
I'm new to c++ and I'm trying to read the first sector on 'c drive' using
absread. This because absread is supposed to read the sector(s) you tell it
to read regardless FAT, directories and files..
Here it is:
#include
#include
void absread(int drive, int nsects, long lsect, void *buffer);
void main(void)
{
char buf[16384];
ofstream file;
cout << "outfile : 1sector.bin " << endl;
file.open("1sector.bin", ios::binary);
absread(2,1,0, buf);
file.write((char *) &buf, sizeof(buf));
file.close;
}
Can ANYONE please tell me what's wrong ???? (I'm using BC4.5)
Bjoernar 'Beej' Jensen
--- BBBS/L v3.33 How
---------------
* Origin: Errors HQ: Prog/Emul/Linux/Demos, +47-56341083 (2:211/16)
|