I'm trying to read a bool setting from a group. I'm using this code, but config_lookup_bool always returns CONFIG_FALSE. As far as I understood it should write the value into send_keys and return CONFIG_TRUE. Is there any mistake in my code or my thought?
Code:
config_t cfg;
int send_keys;
config_init(&cfg);
config_read_file(&cfg, "config.cfg")
if (config_lookup_bool(&cfg, "settings.send_keys", &send_keys))
{
// do something here
}
I'm trying to read a bool setting from a group. I'm using this code, but
config_lookup_bool
always returns CONFIG_FALSE. As far as I understood it should write the value into send_keys and return CONFIG_TRUE. Is there any mistake in my code or my thought?Code:
config.cfg: