How would this look if I used fstream?
I found this code on Planet Source Code. It performs some file I/O to read ID3 tags in MP3 files. Here it is:
I don't actually understand anything that is going on here... I wonder if anyone could herlp me put this into fstream? (i.e. using #include <fstream.h>)
hFile = CreateFile("bond.mp3", // file to read
GENERIC_READ, // open for reading
0, // do not share
NULL,// default security
OPEN_EXISTING, // open file if exists
FILE_ATTRIBUTE_NORMAL, // normal file
NULL); // no attr. template
SetFilePointer(hFile, -128, NULL, FILE_END);
ReadFile(hFile, ID3, 128, &read, NULL);
memcpy(&ID3Data, ID3, 128);
Thankyou so much, I hope that this isn't too much to ask...
~ Chris Howarth