Get char array with cin.getline
#include <iostream> #include <string.h> using namespace std; int main(void) { char string[256]; while (cin.getline(string, sizeof(string), '\n')) cout << strupr(string) << '\n'; }