class - How to fix error C2511: overloaded member function not found in C++? -


i have problem pass own class parameter.

here codes:

payloadcontainer.h

namespace project {     namespace c     {         namespace helper         {             class payloaditem             {             public:                 string key;                 string value;                 char type;                 char mode;                 char isarray;                 int fieldcount;                 char fieldtype;                 int rowcount;             };              class payloadcontainer             {             public:                 payloadcontainer( const char *command );                 payloadcontainer(void);                 ~payloadcontainer(void);              public:                 vector<payloaditem> payloaditems;             };         }     } } 

parsebinary.h

namespace project {     namespace c     {         namespace helper         {             class parsebinary             {             public:                 parsebinary(void);                 ~parsebinary(void);              private:                 void writerequesttobinary( const char *binfilename );                 void writerequestrecord( unsigned char file[], payloaditem& item, string charset );             };         }     } } 

parsebinary.cpp

namespace project {     namespace c     {         namespace helper         {             void parsebinary::writerequesttobinary( const char *binfilename )             {                 unsigned char in;                  //                  (auto &item : _payload->payloaditems)                 {                     //                      writerequestrecord( in, (helper::payloaditem)item, _payload->charset );                 }             }              void parsebinary::writerequestrecord( unsigned char file[], payloaditem& item, string charset )             {                 -----> here, "error c2511: overloaded member function not found".             }         }     } } 

what trying iterating vector payloaditem own class, , pass class function.

but, when build error c2511: overloaded member function not found error.

please tell me fix this.

edit

this error message.

error 9 error c2061: syntax error : identifier 'payloaditem' c:\webdev\project.c.helper\parsebinary.h 46 1 project.c.helper error c2511: overloaded member function not found in 'project::c::helper::parsebinary' c:\webdev\project.c.helper\parsebinary.cpp 958 1 project.c.helper


Comments

Popular posts from this blog

Android layout hidden on keyboard show -

google app engine - 403 Forbidden POST - Flask WTForms -

c - Why would PK11_GenerateRandom() return an error -8023? -