Data.cpp:25: error: no matching function for call to `Data::Set(const char[6], const char[2])'
Data.cpp:9: note: candidates are: void Data::Set(std::string)
Data.cpp:27: error: no matching function for call to `Data::Set(const char[10], const char[2])'
Data.cpp:9: note: candidates are: void Data::Set(std::string)
*** Error code 1
//Config.h
#if !defined(CONFIG)
#define CONFIG
#include <string>
#include <iostream>
#include <map>
#include <boost/algorithm/string.hpp>
#include "Singleton.h"
#include "Algorithms.h"
class Config{
public:
Config();
void Set(std::string path);
void Set(std::string key, std::string value);
void Save();
std::map <std::string, std::string> Get();
std::map <std::string, std::string>* pGet();
std::string Get(std::string& key);
std::string Get(const std::string& key);
//end public:
protected:
std::string filePath;
std::map <std::string, std::string> config;
//end private:
};
#endif
//Data.h
#if !defined(DATA)
#define DATA
#include <fstream>
#include <string>
#include <iostream>
#include <map>
#include "Singleton.h"
#include "Algorithms.h"
#include "Config.h"
#include <boost/archive/text_oarchive.hpp>
#include <boost/archive/text_iarchive.hpp>
#include <boost/serialization/map.hpp>
//#include "CaseInsensitiveMapOrder.h"
#pragma comment(lib, "libboost_serialization-vc71-sgd.lib")
class Data : public Config{
public:
Data();
void Set(std::string filePath);
void Save();
//end public:
};
#endif
Data.cpp line 25 & line 27 respectively
Set("count","0");
Set("downcount","0");
As you can see and as the title suggests. the subclass cannot recognize methods in its parent class.
I don't have much experience with inheritence, can you guide me father?