Hi,
I am using embedded visual C++ 4.0 and I want to use function strtok to split string into array.
my sample code is as below:
----------------------------------------------------------------
void CNEWSERIALNO::OnBInsert()
{
// TODO: Add your control notification handler code here
char seperator[] = "|";
int i;
i = 0;
char *token;
token = strtok("xxxx|ffff", seperator);
while( token != NULL )
{
AfxMessageBox(_T("token"),MB_OK);
// Get next token
token = strtok( NULL, seperator );
}
}
----------------------------------------------------------------
When I compile and build the application, there is no error shown. However, when i try to Click the OnBInsert Button, it does not function like what I expect which 2 message box will appear. It just do nothing, and then after i close the CNEWSERIALNO dialog. all the main form button cannot work include menubar.
Can someone help me ob this matter.
Thanks in advance.
Best Regards