通过计算数组的长度
#include <iostream>
#include <cstring>
using namespace std;
int main()
{
char s[20];
cin.getline(s,30);
if(strlen(s) == 0){
cout << "Array empty" << endl;
}
}
通过计算数组的长度
#include <iostream>
#include <cstring>
using namespace std;
int main()
{
char s[20];
cin.getline(s,30);
if(strlen(s) == 0){
cout << "Array empty" << endl;
}
}