558

BCB Class member problem

//------------------------------------------------------//Unit1.hlass Settings{public:// Security AnsiString pw;// Metods void LoadINI(AnsiString fname,unsigned int AID);};Settings Term[2];//generic classes for settings//------------------------------------------------------//Unit1.cppvoid Settings::LoadINI(AnsiString fname,unsigned int AID){TStringList *Items= new TStringList();TIniFile* ifile = new TIniFile(".\\"+fname);ifile->ReadSections(Items);FID=AID;pw=ifile->ReadString(Items->Strings[FID],"pw","none");delete Items;delete ifile;}//------------------------------------------------------//Password.cpp#include #pragma hdrstop#include "Password.h"#include "Unit1.h"#pragma package(smart_init)#pragma resource "*.dfm"TForm2 *Form2;AnsiString tmpPw;void __fastcall TForm2::btnOKClick(TObject *Sender){AnsiString pw1,pw2;pw1=tmpPw;pw2=Term[0].pw;if(p1==p2) { Application->Restore(); Form1->SetVisibility(true); }} //__________________________________Trouble:pw2 yn Password.cpp obtine valoarea null. deshi yn debuger Term[0].pw are valoare "test" de exemplu.pls, help me, unde este bugu?care este problema ca nu pot obtine valoarea La Term[0].pw
0