[sword-devel] Adding a conf entry (C++)

Peter von Kaehne refdoc at gmx.net
Sat Sep 5 03:45:01 MST 2015


What am I doing wrong here?
....
SWConfig *config = new SWConfig(modFile.c_str());                      
&config["InstallTime"] = ctime(0);
config->Save();
....

On compiling I get an error 

error: invalid types 'sword::SWConfig*[const char [12]]' for array
subscript

I did think that this was the code to access a specific conf entry both
for reading and for writing. I got that code from the Doxygen entry on
SWConfig

Background - I think that properly installed modules should have a conf
entry to show when they were installed. This (and a conf entry where
they came from) would make it a lot easier for people who test modules
(rather than usual users) to track down rogue modules which have been
abandoned by the mother repo without an Obsoletes message or which have
been installed by direct copying. 

Peter





More information about the sword-devel mailing list