hi,everyone

I want to use the _mbsnbcnt() to get the bytes number of a string

my code is as follows:

define CHAR_PER_LINE 30
char *pBuf=new char[100];
memset(pBuf,32,100);

int my function:i first read in string from the txt file,and then use
the following line:

int nLen=_mbsnbcnt( (unsigned char*)pBuf,CHAR_PER_LINE);

when i check the value of the nlen , i found that some times it larger than the CHAR_PER_LINE,why?