I'm trying to read this example of configuration with libconfig library in C, but don't see any example of reading a list and store it...
sound = {
string_length = 50;
sound_folder = "./bin/sound/";
sounds_number = 4;
sounds_list = ( "001_piano.wav", "voz4408.wav", "001_bajo.wav", "001_bateriabuena.wav" );
};
I what to know if there is a way to load a list like the sounds_list. And don't create a structure like the way I have it now:
sounds_list = ( { file_name = "001_piano.wav";},
{ file_name = "voz4408.wav";},
{ file_name = "001_bajo.wav";},
{ file_name = "001_bateriabuena.wav";}
);
you can use the structure as followed:
when you want to parse the parameter above, you can use the code as followed:
you can also refer libconfig_manual for more information