Simple config file class with added support for floats
Fork of ConfigFile by
Diff: ConfigFile.h
- Revision:
- 6:78404e968c3e
- Parent:
- 5:8c8cf4615b32
--- a/ConfigFile.h Thu Jan 27 21:46:18 2011 +0000 +++ b/ConfigFile.h Mon Dec 29 10:01:31 2014 +0000 @@ -88,6 +88,15 @@ */ bool Value(char *key, int *value, int def); +/** Read Float value. If file is not open, or key does not exist: copy default value (return false) + * @param key name of the key in the file + * @param value pointer to integer that receives the value + * @param def Default value. If the key is not found in the file, this value is copied. + * @return "true" if the key is found "false" is key is not found (default value is returned) + */ + bool Value(char *key, float *value, float def); + + private: FILE *fp;