|
-
May 22nd, 2004, 03:10 AM
#1
_mbsnbcnt() problems
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?
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|