Compare commits

..

No commits in common. "dev" and "cmake" have entirely different histories.
dev ... cmake

4 changed files with 3 additions and 9 deletions

View File

@ -13,11 +13,10 @@ Easily load variable configuration parameters into your program using this libra
- Predefined necessary keys and enabled validation
- Strict configuration file format
- Comments in configuration file supported
- Update config file from program
## Installation
Just download the latest release and use cmake build system
Just download the latest release and unzip it into your project. You can turn it on with:
```c++
#include "config/lib/config.hpp"

View File

@ -10,4 +10,3 @@ DinioServer1Port=5000;
DinioServer2Port=4048;
DinioGetIPURL=http://lab-it.ddns.net/getip/index.php; #ovo ide na više A recorda i više servera pod istim domenom
# DinioGetIPURL2=http://ns-hl.ddns.net/getip/index.php;
Baba2=Janja;

View File

@ -14,10 +14,7 @@ marcelb::config::config(const string _configFilePath, const vector<string> _nece
string marcelb::config::operator[](const string& key) {
if (element.count(key)) {
return element[key];
}
return "";
return element[key];
}
void marcelb::config::update(const string& key, const string& value) {

View File

@ -1,6 +1,5 @@
#include <iostream>
#include "../lib/config.hpp"
#include <unistd.h>
using namespace std;
using namespace marcelb;
@ -13,6 +12,6 @@ int main() {
mycfg.update("Baba2", "Janja");
cout << mycfg["Baba"];
sleep(10000);
return 0;
}