using namespace std;
#include <string>
#include<ctype.h>
CString cStr1("0erd");
CString cStr2 = cStr1.Left(1);
char * ch = cStr2.GetBuffer();
bool b = false;
b = isdigit(*ch);
本文介绍了一个C++示例代码,演示了如何从CString对象中截取子串并判断其首字符是否为数字。通过对 CString 类的使用及 isdigit 函数的应用,展示了简单的字符串处理技巧。
using namespace std;
#include <string>
#include<ctype.h>
CString cStr1("0erd");
CString cStr2 = cStr1.Left(1);
char * ch = cStr2.GetBuffer();
bool b = false;
b = isdigit(*ch);
1665

被折叠的 条评论
为什么被折叠?
