关于gets的用法
#include <iostream>#include <string>using namespace std;int main(){ char str[5]; gets(str); cout << str; return 0;}#include <iostream>#include <string>using namespace std;int main(){ char str1[5] = {0}; char str[5] = {0}; char buf[10]= {0}; gets(str); cout << "str: " <<str <<endl; cout << "str1:" <<str1 <<endl; cout << "buf :" <<buf <<endl; return 0;}