Thread: ini file
View Single Post
  #1 (permalink)  
Old January 30th, 2006, 06:29 AM
ptop ptop is offline
Registered User
 
Join Date: Jan 2006
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
Default ini file

Hi everyone
I would like to create directory.ini file, in that file I would like to put the path directory.
directory.ini
structure
[inpath]c:\In\month1.csv
[outpath] c:\out\report1.csv

I did not use ini file before so, is there anyone have a full idea if my writing the the right structure and how to called in my code stream, is it the same, can anyone give me some simple examples

Code:
ifstream input_file(filename);
     if(!input_file.is_open())
     {
       return 1;
     }
     else
[/code]

another problem is that month1.csv will change with the months of the year, is the a possibility to put in the [inpath] only the path and concatnate the path with file name
structure
[inpath]c:\In[outpath] c:\out
Code:

month%d.csv

report%d.csv
[/code]
how to concatinate the inpath from directory.ini file with the file month%d.csv in my C++ code.

thank you

Reply With Quote