I couldn't figure out how to have an input with spaces stored in a string so I store it in a char first and I want to copy it to the string.
string name[2]={"Sample name"};
char apname[50];
cout << "Input Name: ";
cin.getline(apname,sizeof(apname));
strcpy (apname,name[2]);
If there's an easier way to do this please help me.