c++ - new to CPP: Compiler error -


compilation fails following output.

any thoughts please..

pstore.cpp pstore.cpp(169) : error c2220: warning treated error - no 'object' file generated pstore.cpp(169) : warning c4091: '' : ignored on left of 'bool' when no variable declared pstore.cpp(169) : error c2143: syntax error : missing ';' before 'inline function header' pstore.cpp(170) : error c4430: missing type specifier - int assumed. note: c++ not support default-int pstore.cpp(170) : error c2556: 'int pstore::getversion(std::string &)' : overloaded function differs return type 'bool pstore::getversion(std::string &)'     ../include\pstore.h(48) : see declaration of 'pstore::getversion' pstore.cpp(170) : error c2371: 'pstore::getversion' : redefinition; different basic types     ../include\pstore.h(48) : see declaration of 'pstore::getversion' 

here code snippet:

bool pstore::getversion(std::string& version) {     ampi_info("[api]");      return getversionnologging(version); } bool pstore::getversionnologging(std::string& version) {     version = ampi_pstore_version " " __date__ " " __time__;      return true; } 

please post code errors can explained.

one of errors obvious however: can't have 2 functions same parameters , same name.

in case have int pstore::getversion(std::string &) , bool pstore::getversion(std::string &), not legal.

either change name of 1 of functions, or change type or number of parameters of 1 of functions.


Comments

Popular posts from this blog

c# - SVN Error : "svnadmin: E205000: Too many arguments" -

c# - Copy ObservableCollection to another ObservableCollection -

All overlapping substrings matching a java regex -