This is part of my code and i'm stuck on the cin part i dont exactly remember how it went for arrays... i need to cin a name that contains whitespace but when i do that the program starts looping forever...or skips an entry. Now i remember its something like cin.getline() but i can't figure it out any help would be greatly appreciated thx!
Code:#include <iostream> #include <string> #include <iomanip> using namespace std; const int MAX = 40; void bubbleID(int id[], int max); void bubbleName(string name[], int max); void dsply(); int main() { int id[40]; string name[40]; char choice; bool running = true; int count = 0; while(running) { dsply(); cin >> choice; switch(choice) { case 'A': case 'a': cout <<"\n"<< count + 1 << ":\n\nEnter Student's CWID: "; cin>>id[count]; cout << "\nEnter Student's Name: "; cin>>name[count]; break;