diff --git a/cpp/cfgfile.cpp b/cpp/cfgfile.cpp new file mode 100644 index 0000000..b752a00 --- /dev/null +++ b/cpp/cfgfile.cpp @@ -0,0 +1,92 @@ +#include +#include +#include + +typedef void (*pfun)();//The Function Pointer + +static bool readCfgFile(const char * cfgfilePath,const std::string &key,std::string &value){ + //Open The Config File + std::fstream cfgfile; + cfgfile.open(cfgfilePath); + if(!cfgfile.is_open()){ + std::cout<<"Failed to open the file!"<