VB
Dim fno as string
Dim F_Name As String
Dim sno As Long
Dim aa() As Long
1: fno = FreeFile();
2: Open F_Name For Binary Access Read As #fno
3: Len(sno)
4: ReDim aa(ll - 1)
5: Get #fno, , aa
6: Dim aa() As Long
7: Seek #fno, Seek(fno) - (gbuff.nSize - sno)
以上七点在VC6.0该用什么样的语句才能正确的表示!
拜托!
Dim fno as string
Dim F_Name As String
Dim sno As Long
Dim aa() As Long
1: fno = FreeFile();
2: Open F_Name For Binary Access Read As #fno
3: Len(sno)
4: ReDim aa(ll - 1)
5: Get #fno, , aa
6: Dim aa() As Long
7: Seek #fno, Seek(fno) - (gbuff.nSize - sno)
以上七点在VC6.0该用什么样的语句才能正确的表示!
拜托!
in vc: TCHAR fno[256]; //在c\c++里的字符串必须给出长度,不过你也可以用stl或别的库,他们提供了字符串对象,例如:
#include <string>
using namespace std;
...
..
string fno;
..
..3. Dim sno As Long
in vc: long sno;不知道vb里的freefile有什么用`不过想在c++里做文件操作也方便``看这里:
http://blog.csdn.net/phonelear/archive/2004/10/14/136690.aspx
{
FILE *stream;
char line[81];
int result; stream = fopen( "fseek.out", "w+" );
if( stream == NULL )
printf( "The file fseek.out was not opened\n" );
else
{
fprintf( stream, "The fseek begins here: "
"This is the file 'fseek.out'.\n" );
result = fseek( stream, 23L, SEEK_SET);
if( result )
perror( "Fseek failed" );
else
{
printf( "File pointer is set to middle of first line.\n" );
fgets( line, 80, stream );
printf( "%s", line ); }
fclose( stream );
}
}