I am getting this error when I compile with GCC:
error: declaration of 'static int utils::StringUtils::SplitString(const std::string&, const std::string&, std::vector<std::basic_string<char> >&, bool)' outside of class is not definition Code:
Header:
namespace utils { /* * This class provides static String utilities based on STL library. */ class StringUtils { public: /** * Splits the string based on the given delimiter. * Reference: http://www.codeproject.com/Articles/1114/STL-Split-String */ static int SplitString( const std::string& input, const std::string& delimiter, std::vector<std::string>& results, bool includeEmpties = true ); }; }; Source:
namespace utils { int StringUtils::SplitString( const std::string& input, const std::string& delimiter, std::vector<std::string>& results, bool includeEmpties ); { .... } }