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

Jaak Ristioja jaak at ristioja.ee
Sat Sep 5 06:50:08 MST 2015


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Try (*config)["InstallTime"] or config->operator[]("InstallTime")
because config is a pointer.

J

On 05.09.2015 13:45, Peter von Kaehne wrote:
> 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
> 
> 
> 
> _______________________________________________ sword-devel mailing
> list: sword-devel at crosswire.org 
> http://www.crosswire.org/mailman/listinfo/sword-devel Instructions
> to unsubscribe/change your settings at above page
> 

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2

iQIcBAEBAgAGBQJV6vMOAAoJEIqsii/PFAD1ElAP/028ZtSpURtybagqFq4yr/OH
+XYlzs4V7jP67+TwsVBU7zofCqIzwumd9ZAf2Z70k7qK6fJ5yP7PkFmLTh9FX9u3
RM8ZIF5dXjHzKwLbJ2U6iSk4J2AkZSItHNdsa8iAz6/5NoTGNphMchYFprUPXlQj
UuHKAtH5vgg939aTkXOCy5HVLt4AALcBDmSkR75Y2P3+pjc8uiO0VECYyS5XGci3
OX8ZJcQR8/VUVJveZl1XJ4mbasaoE2PTAtvbnan8cNpQXFsKwEv+2TPPOkBbJ9+G
+NNsUGqOHvS73yTu8iEh0LCjbbvEYumFcB/xY4CkqS4pxIhqFsj5aU1239/D6//o
eQvwmqzTq67y3sv5euvzRfmY7JPCvoRCwrMbK8SXLb3TifSmPL6qkiK9O2ZSTxRa
rUydMWOVRm6bnysfsY4lsYMwHMMWvGeF7kftKTzNR9+mu2NSJCGV4MjPU+eIxUh9
LOLKqYPyAYtbcqeTyRnwVJXxpjrBYuP+mQO/xZWSVg7+c+J5vIehT74EdW3ncnpi
WEw0JE+T6o34DKmm1huwmXINMG450TY/L7J3IZA1XTWeVNjTO3IbylXWMWIePBj1
l2DlM0oZVmIx27GPne/dcaMdko402YxrD9V5ol3QbqJUouG8uYA1icG5QgxEoM8/
LcewOwFSdVxQ/AHyl8EK
=Gcrc
-----END PGP SIGNATURE-----



More information about the sword-devel mailing list