// P. Conrad CISC181 05F
// why.you.need.cin.ignore.cc


/* Because when you run this program, this happens:

> ./why.you.need.cin.ignore 
enter option :g
option ='g'
enter bandName :enter leadSinger :Bono
bandName = 
leadSinger = Bono
> 

*/

#include <iostream>
using namespace std;

int main(void)
{

  char bandName[30];
  char leadSinger[20];
  
  char option;

  cout << "enter option :";
  cin >> option;

  cout << "option ='" << option << "'" << endl;
  
  cout << "enter bandName :";
  cin.getline(bandName,30);
  cout << "enter leadSinger :";
  cin.getline(leadSinger,30);


  cout << "bandName = " << bandName << endl;
  cout << "leadSinger = " << leadSinger << endl;

  return 0;
}

