Can anyone pls help me? I'm now developing a GUI using MFC, and when I click a button, it will call this function OnAdd(). In OnAdd, it is suppose to run my application "clusters.exe" but it doesn't. Does anyone knows why?
Code:
void CDialog1Dlg::OnAdd()
{
// TODO: Add your control notification handler code here
CString strTitle ;
int nIndex, minsup;
double delta;
char str_cmd[100];
UpdateData(); // Transfer data from controls to variables
//get currently selected text
nIndex = GetDlgItemText(IDC_TITLE, strTitle); //assigning selected
m_strFullName = strTitle + " " + m_strFirstName + " " + m_strLastName;
minsup = atoi(m_strFirstName);
delta = atof(m_strLastName);
sprintf(str_cmd, "clusters.exe input.txt %d %d %f 2 1 result.txt", minsup, minsup, delta);
printf("%s\n", str_cmd);
system(str_cmd);
UpdateData(FALSE); // Transfer data from variables to controls
}