class BufferFile{
public:
BufferFile(IOBuffer &);
int Open(char *);
int Create(char *);
int Close();
int Rewind();
int Read(int recaddr = -1);
int Write(int recaddr = -1);
int Append();
IOBuffer & GetBuffer();
protected:
IOBuffer & Buffer;
std::fstream File;
int HeaderSize;
int ReadHeader();
int WriteHeader();
};
BufferFile::BufferFile(IOBuffer & from):Buffer(from){}
int BufferFile::Read(int recaddr){
if(recaddr==1) return Buffer.Write(File);
else return Buffer.DWrite(File, recaddr);
}
int BufferFile::Append(){
File.seekp(0,std::ios::end);
return Buffer.Write(File);
}
IOBuffer & BufferFile::GetBuffer(){
return Buffer;
}
int BufferFile::ReadHeader(){
return Buffer.ReadHeader(File);
}
int BufferFile::WriteHeader(){
return Buffer.WriteHeader(File);
}
我从IOBuffer字段中得到了几个错误,说它在“~&;”之前没有在函数范围中声明或“预期”)™ token”,是什么导致了这些问题?
Here are all the files involved in this project:
Person.h!
Buffile.cpp
BuffFile.h
Delim.cpp
Delim.h
Fixfld.cpp
Fixfld.h
FixLen.cpp
FixLen.h
Iobuffer.cpp
Iobuffer.h
Length.cpp
Length.h
Varlen.cpp
Varlen.h