C++ (Qt)
for (int i=0;i<TargetNum;i++)
{
mes *frm = new mes;
frm->exec();
qstrncpy(TargetAppName, ui.lineEdit -> text().toAscii().constData(), 127);
qstrncpy(TargetQMName, ui.lineEdit_1 -> text().toAscii().constData(), 127);
strcpy(Targets.Targets[i].TargetApp,TargetAppName);
strcpy(Targets.Targets[i].TargetQM,TargetQMName);
}