View Full Version : Saving and loading variables with .ini files
Are INI files useful for storing variables, especially in a basic hex-style format? I'm working with file communication, where two executables interchangeably interact with a single .ini file. Basically I would create a script, particularly using C++ or GML, to create the configuration; a string, mv = 0;, is stored. Basically I would like to load the variable and have both applications first recognize it, then display it. Take note that the applications and the configuration file are separately made from each other but with the same programming language. The string is primarily the only thing that is involved in this process.
01-02-2013, 05:00 AM
Yeah you can use INI files to do that. I personally would use XML instead for two main reasons:
If you write an XSD you can generate classes to represent the file and it makes it easier for serialization and deserialization.
There are lots of premade XML libraries for almost every language unlike for INI files.
01-20-2013, 02:32 PM
Serialization/Deserialization is one of the main benefits of XML, but XML can also store more complex and larger data than a true INI file, as an INI file has limitations to the data size that you're allowed to have per key I believe.
Powered by vBulletin® Version 4.2.2 Copyright © 2017 vBulletin Solutions, Inc. All rights reserved.