11/21/05 CISC181 (1) cin.ignore() Why you might need cin.ignore() (see why.you.need.cin.ignore.cc) How to use cin.ignore (see cin.ignore.example.cc ) How to avoid needing to use cin.ignore() If you use cin.getline anywhere in your program, use it EVERYWHERE. If you need to read a single character, then read into a great big character array, and pull out element [0]. char option; char greatBigArray[1024]; cin.getline(greatBigArray, 1024); option = greatBigArray[0]; instead of: char option; cin >> option; Similarly, for int x; cin >> x; Use: int x; char greatBigArray[1024]; cin.getline(greatBigArray, 1024); x = atoi(greatBigArray); similar for double, except instead of atoi, use atof (there is no atod except in wrong answers to multiple choice) The following do exist, and you can use "man" to learn about them: strtod strtoul (2) Continuing with our readAttendanceFile example Today's first topic: Finishing up in readAttendanceFile.cc with the sorting example, showing how to sort an array of structs. (3) Classes