char test[512 + 1] = {0}; string test2; cin.getline(test,sizeof(test)-1); test2 = test;