Hello there, is there a function in Linux that can handle the reading of an .ini file? Thanks.
Not that I know of, but you could probably roll your own pretty easily. I know there are a lot of libraries people wrote on Google as well...
How complex is the INI file you want to read? (Does it stick to the simple
[this is a section header]
this=is a value format?)
I'm sure I came across a nice library about a year ago that is pretty advanced. If I can remember what it is I'll post back.
>[this is a section header]
this=is a value
yeah, with that values. I'm still having a hard time figuring out because the ini file that I generated in windows is compose of wchar_t characters.
>I'm sure I came across a nice library about a year ago that is pretty advanced. If I can remember what it is I'll post back.
I would love to see that library. Thank you in advance. :)
>>yeah, with that values. I'm still having a hard time figuring out because the ini file that I generated in windows is compose of wchar_t characters
Ohhh that is not very good. The sizeof(wchar_t) in Windows compilers is not the same as in *nix compilers. The last time I checked Windows = 2 (short int) while *nix was 4 (long). So to read the file in *nix you will probably have to read each character as a short then convert it in memory to wchar_t (a long).
I doubt you will find any *nix library that will read that windows-generated file because of the size problems I mentioned above. But what you could do is write a program to convert the entire file then use one of those library functions to parse it.
I've never heard of an INI file that isn't ASCII encoded. Too bad they don't all just die... (that is, seems odd to me people still use them, because for all their supposed simplicity they can sure give you headaches)...
Have you considered storing all your init data in an XML file instead?
There are libraries to support XML, and plenty of tools to deal with XML.
I have considered it but there are restrictions from the input file and I have no control over that.
Hi. I have a form with list box : lst_product, datagridview : grd_order and button: btn_addline. lst_product has a list of product ids selected from database (MS Acess 2013) , grd_order is by default empty except for 2 headers and btn_addline adds rows to grd_order.
Private Sub btn_addline_Click(ByVal ...
Hi, as I was told that my code doesn’t scale well at all, I thought perhaps I’d try to get a better understanding of interfaces/abstract classes and classes and the relationship between them.
I don’t want at this stage work on a big separate project as I've already got plenty ...
OK, so HostGator for some reason no longer allows gcc/g++ access unless you have a Designated Server account, which is a lot of money to spend just to compile my "Hello World" program. Thus I figured I'd compile at home, then upload. Program is your regular old bare-bones Hello World ...