How do I cin and cout char arrays?
Printable View
How do I cin and cout char arrays?
Note that this only allows 19 characters and does NOT check for overflow, so I rather see you using the Standard Library:PHP Code:char c[20];
cin >> c;
cout << c;
PHP Code:include <string>
string s;
cin >> s;
cout << s;