antarey Posted July 27, 2020 Posted July 27, 2020 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 Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.