cin 问题求解
下面是我的程序:
#include <iostream>using namespace std;int main(){ char str1[10]; char str2[10]; int i; i = 0; do { cout << "\nEnter the first string:\n\n\t"; cin >> str1; cout << str1; cout << "\n\nEnter the second string:\n\n\t"; cin.get (str2, 5); cout << str2 << endl; } while (i ++ < 4); return 0;}