64,682
社区成员
发帖
与我相关
我的任务
分享
#include <iostream>
#include <cctype>
#include <string>
#include <stdio.h>
using namespace std;
int main()
{
char m[20]; ///设置了长度为20
cin.getline(m,20); ///读入的数据为20
cout<<m<<endl; ///正常输出数据20
cout<<isdigit(m[0]); ///这里开始出问题了,如果(m)是没办法运行的报错
cout<<m[0]<<endl; ///看看m[0]是什么,结果不是想要的数据
}