I've been banging my head trying to figure this one out. I would love to have a couple of you have a crack at it because I'm all out of ideas.
bool characterGetCFG1(string typeOverLoad, string var_name, string full_text) {
int pos = full_text.rfind(var_name) + var_name.length() + 1;
char character = full_text.at(pos);
if (character == 't' || 'T') {
cout << full_text << "\n";
cout << "features.assigned, " << var_name << ", " << full_text.at(pos) << ".\n";
cout << "returned true \n";
cout << character << "\n";
return true;
}else{
cout << "returned false \n";
return false;
}
void setconfig(glow_t passed_glow) {
ifstream file;
file.open("config.cfg");
if (!file.is_open()) {
exit(-10);
}
std::string raw;
while (file.good()) {
raw.assign(std::istreambuf_iterator<char>(file), std::istreambuf_iterator<char>());
file >> raw;
}
file.close();
feats.setGlow(characterGetCFG1("t", "glow", raw));
Don't worry about the brackets I have the correct amount in project, I coulnd't fit them all in the code tag sadly.
EDIT: I forgot to incldue the 'config.cfg' file here ya go below.
glow=false