First page Back Continue Last page Graphics
Line Input Problem
In lab, many people had problems with something like the following:
- int my_i(0);
- char name[25];
- cout << “Enter a value for my_i : “;
- cin >> my_i;
- cout << “Enter a name: “;
- cin.getline(name,25);
- cout << “my_i = “ << my_i << “, name = “
- << name << endl;