Stack Overflow

This is about the basics of what I'm trying to do:

const cfgFile = 'ext-pisg.conf';

procedure tConfig.Load;
var cfgIni : TIniFile;
    str : TStrings;

begin
 cfgIni.Create(cfgFile);
 MessageDlg(cfgIni.FileName, mtInformation,
      [mbOk], 0);


end;

but whenever I call the cfgIni.Create(cfgFile); i get a Stack Overflow. Do you know why this happens?

Thx
ProfessorAsked:
Who is Participating?
 
kretzschmarCommented:
instead Of

cfgIni.Create(cfgFile);
 
use

cfgIni := TIniFile.Create(cfgFile);

meikl ;-)
 
0
 
ProfessorAuthor Commented:
Figured it out ;)
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.