Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 5970085
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 22, 20262026-05-22T20:19:25+00:00 2026-05-22T20:19:25+00:00

class BufferFile{ public: BufferFile(IOBuffer &); int Open(char *); int Create(char *); int Close(); int

  • 0

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);  
}  

I am getting several errors form the IOBuffer field, saying that it was not declared in the function scopes or “expected `)’ before ‘&’ token” on the constructor.

Any help is appreciated

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-22T20:19:26+00:00Added an answer on May 22, 2026 at 8:19 pm

    Several of the errors mention that class IOBuffer has no member named "pack". The message is absolutely correct, it doesn’t; if you look at the header, it has a method named Pack, with a capital P. C++ is case-sensitive!

    The errors about “redefinition” are happening because your include files don’t have include guards to prevent them from being included multiple times — you need to fix that.

    That leaves only a few errors remaining; when you’ve got everything down to those last few, come back and talk to us again. This time, no images! No links! Just paste the actual text of the error message, and the few lines of code where the errors occur, and somebody will be able to help you.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

class CConfFile { public: CConfFile(const std::string &FileName); ~CConfFile(); ... std::string GetString(const std::string &Section, const
class A; class B { public: B(A& a) : a(a) {} private: A& a;
class MyString { public: MyString(int length):_ptr(alloca(length)) { } //Copy Constructor, destructor, other member functions.
class someclass {}; class base { int a; int *pint; someclass objsomeclass; someclass* psomeclass;
class AbstractQuery { virtual bool isCanBeExecuted()=0; public: AbstractQuery() {} virtual bool Execute()=0; }; class
class C { T a; public: C(T a): a(a) {;} }; Is it legal?
class Ball: a = [] def __init__(self): pass def add(self,thing): self.a.append(thing) def size(self): print
class Catalog { // string StationTitle; string StationLocation; public: string StationTitle; Catalog() { StationTitle
I have this class: public class UploadFile : INotifyPropertyChanged { private string name; public
class CHIProjectData : public QObject { public: CHIProjectData(); CHIProjectData(QMap<QString,QString> aProjectData, CHIAkmMetaData* apAkmMetaData = 0,

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.