Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations wOOdy-Soft on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

INI files

Status
Not open for further replies.

tg2003

IS-IT--Management
Feb 6, 2003
270
IL
Hello,
I'm a VB programmer that usually use INI files to store pairs of data information. I would like to know if it's possible to use the same files in CPP (I'm using VS6, and the code is intended to work under Windows)

Thanks in advance!
 
Well, I don't know about VB. What do exactly that files contain? Just plain text?

Then you will have no probles to read then in C++.

Does VB have a speciall class/utility/function to read ini files?

Cheers,
Dian
 
See also GetPrivateProfileString/WriteProfileString API.
But (about ini files in Win32;):
MSDN said:
This function is provided for compatibility with 16-bit Windows-based applications. WIn32-based applications should store initialization information in the registry.
 
Wow, I never knew about those functions! All this time I've been parsing INI files the hard way... :(
 
cpjust,
writing home-made ini-like format parsers is a simple and refreshing exercise (not a waste of time;).
Obtain controlled and robust mini-component and derive pleasure...
 
Otherwise generally known as reinventing the wheel...

Spent my entire programming career doing that :)
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top