VB语句如下:
struct aa
{
};
aa test
open "C:\1.txt" for random Access Read Shared as #1 len=Len(test)
while Not EOF #1 dim i as integer i=i+1 Get #1,i,test
wend
struct aa { }; aatest; CFile f("c:\\1.txt",CFile::shareDenyNone|CFile::modeReadWrite); int i=0; while (f.GetPosition()<f.GetLength()) { i++; f.Read(&test,sizeof(aa)); }