|
ReadSectionValues() 메소드를 이용하세요.
//////////////////////////////////
TIniFile * test = new TIniFile("C:\\My\\test.ini"); //ini파일
TStringList * SecList = new TStringList; //색션 리스트
TStringList * ValueList = new TStringList; //값 리스트
test->ReadSections(SecList); //test색션리스트 읽어오기
for(i = 0;i < SecList->Count; i++){
test->ReadSectionValues(SecList->Strings[i], ValueList);
}
축구 님이 쓰신 글 :
: 만약 파일안에
:
: [fruit]
: apple=1
: banana=2
:
: [drink]
: coca=3
: milk=4
:
: [car]
: sonata=5
: avante=6
:
: 이렇게 있다고 할때
: TIniFile * test = new TIniFile("C:\\My\\test.ini"); //ini파일
:
: TStringList * SecList = new TStringList; //색션 리스트
:
: test->ReadSections(SecList); //test색션리스트 읽어오기
:
: 이렇게 하면
: SecList->Count //색션리스트 카운트
: 카운트 값이 fruit, drink, car 이렇게 3개가 되는건가요?
: 아님 색션안에 키와 벨류가 카운트 되는건가요?
:
: 만약 색션만 카운트 된거라면
: fruit색션 안의 키와 벨류 카운트를 쓰려면 어떻게 해야하나요?
|