Compare commits
1 Commits
Author | SHA1 | Date | |
---|---|---|---|
d00eee88d6 |
@ -10,3 +10,4 @@ DinioServer1Port=5000;
|
|||||||
DinioServer2Port=4048;
|
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
|
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;
|
# DinioGetIPURL2=http://ns-hl.ddns.net/getip/index.php;
|
||||||
|
Baba2=Janja;
|
||||||
|
@ -14,7 +14,10 @@ marcelb::config::config(const string _configFilePath, const vector<string> _nece
|
|||||||
|
|
||||||
|
|
||||||
string marcelb::config::operator[](const string& key) {
|
string marcelb::config::operator[](const string& key) {
|
||||||
return element[key];
|
if (element.count(key)) {
|
||||||
|
return element[key];
|
||||||
|
}
|
||||||
|
return "";
|
||||||
}
|
}
|
||||||
|
|
||||||
void marcelb::config::update(const string& key, const string& value) {
|
void marcelb::config::update(const string& key, const string& value) {
|
||||||
|
@ -1,5 +1,6 @@
|
|||||||
#include <iostream>
|
#include <iostream>
|
||||||
#include "../lib/config.hpp"
|
#include "../lib/config.hpp"
|
||||||
|
#include <unistd.h>
|
||||||
|
|
||||||
using namespace std;
|
using namespace std;
|
||||||
using namespace marcelb;
|
using namespace marcelb;
|
||||||
@ -12,6 +13,6 @@ int main() {
|
|||||||
mycfg.update("Baba2", "Janja");
|
mycfg.update("Baba2", "Janja");
|
||||||
cout << mycfg["Baba"];
|
cout << mycfg["Baba"];
|
||||||
|
|
||||||
|
sleep(10000);
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
Loading…
x
Reference in New Issue
Block a user