下面的代码实现了输入的字符个数不能超过六个,六个字符够了以后就强制停止输入
#include#include using namespace std; int main(void) { string ch=""; char m; for(int i=0;i<6;i++){//限制只能使用6个字符 //cout<<" i的值为"<

下面的代码实现了输入的字符个数不能超过六个,六个字符够了以后就强制停止输入
#include#include using namespace std; int main(void) { string ch=""; char m; for(int i=0;i<6;i++){//限制只能使用6个字符 //cout<<" i的值为"<