摘要: 首先,c语言中没有string类型,直接用scanf读入string类型是不正确的。如: string a; scanf("%s",a); // 录入"asd" cout << a; // 输出后a是空 正确方式: string a; a.resize(8); scanf("%s",&a[0]); 阅读全文
posted @ 2023-10-20 10:49 _titleInfo 阅读(26) 评论(0) 推荐(0) 编辑