class - Error: no instance of overloaded function, in constructor (C++) -


i have weird problem... first of all, here class's files:

show.h:

#ifndef show #define show  #include <iostream> #include <string> #include <string.h>  class show { private:     std::string m_time;     int m_serial public:     show(const std::string &time, const int &serial);     ~show(); }; #endif 

show.c:

#include "show.h"  show::show(const std::string &time,const int &serial) {  } 

as can see, wrote declaration of constructor, when visual studio underlined second "show" word in show.c file, , told me:

"void show::show(const std::string &time,const int &serial)

show::show()

show::show(const show &)

error: no instance of overloaded function "show::show" matches specific type"

and when stand mouse cursor on constructor function in show.h file looks function doesn't exists... have written classes in c++ before, , first time happens me... please :(

you forgot put ; after m_serial field variable. believe reason of problem have. unfortunately many compilers not give exact reason of problems this, have careful syntax rules.


Comments

Popular posts from this blog

ios - iPhone/iPad different view orientations in different views , and apple approval process -

java Extracting Zip file -

C# WinForm - loading screen -