Jump to content

Recommended Posts

Posted

Good day.
Tell me how to translate this code into c ++?

var
  FrmList : TList;
  I : Integer;
  Frm : TUniBaseForm;
begin
  FrmList := UniSession.FormsList;

  UniListBox1.Clear;
  for I := 0 to FrmList.Count - 1 do
  begin
    Frm := FrmList[I];
    UniListBox1.Items.Add(Frm.Name + ' ' + Frm.ClassName  );
  end;

Problem with Frm := FrmList;

Variants

frm = UniSession->FormsList->Items; ->E2034 Cannot convert 'void *' to 'TUniBaseForm *'
frm = dynamic_cast<TUniBaseForm*>(UniSession->FormsList->Items); ->  E2307 Type 'void' is not a defined class with virtual functions
frm = dynamic_cast<TUniBaseForm*>(UniSession->FormsList); ->E2031 Cannot cast from 'TList' to 'TUniBaseForm *'

give an error

Thanks

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...