Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- MySQLInterface::MySQLInterface(const char* configfile)
- {
- TiXmlDocument doc;
- if (!doc.LoadFile(configfile))
- return;
- TiXmlHandle handle(&doc);
- auto child = handle.FirstChildElement("database");
- auto element = child.ToElement();
- if (element == NULL)
- return;
- hostname = element->Attribute("host");
- port = atol(element->Attribute("port"));
- username = element->Attribute("user");
- password = element->Attribute("pass");
- database = element->Attribute("database");
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement