Hi,
Since I am a beginner in software development I am not sure how to go about static variables in the program.
My approach was to use a configuration file that could be accessed for details like port number, directory path etc. For this I have been using QSettings to access my Config.ini.
I had seen few seniors at work (using visual studio with c++) use Config.xml that they parse at the launch of the application and save it in a structure.
So I was planning to do something similar with my Qt application. I wanted to create a Config.h file with all the global variables, structures. I want my software at bootup to parse this config file (Config.ini) and assign the global variables the corresponding values from the file. I am planning to import this Config.h wherever the global variables are used.
Is this a good approach? Any help or suggestions is appreciated. If you could give me links to examples it would be great.
Thank you
Bookmarks