Hello,
I wish to read in a string of chars into a char array then add a carriage return and a line feed to the end then send it elsewhere; i'm trying to do it in the following manner:
char cMess[32] = {0};
GetDlgItemText ( IDC_EDIT1, cCom, 32);
int iLen = strlen( cCom );
cCom[iLen] = (char)(13); // carriage return
cCom[iLen+1] = (char)(10); // line feed
sendstuff( cCom, iLen+2 );
the problem is it doesn't seem to work, could anyone please offer any advice?
Thanks, BigDaz.
I wish to read in a string of chars into a char array then add a carriage return and a line feed to the end then send it elsewhere; i'm trying to do it in the following manner:
char cMess[32] = {0};
GetDlgItemText ( IDC_EDIT1, cCom, 32);
int iLen = strlen( cCom );
cCom[iLen] = (char)(13); // carriage return
cCom[iLen+1] = (char)(10); // line feed
sendstuff( cCom, iLen+2 );
the problem is it doesn't seem to work, could anyone please offer any advice?
Thanks, BigDaz.