Ejemplo n.º 1
0
//----------------------------------------------------------------------
//    Global functions
//----------------------------------------------------------------------
char myGetChar(istream& istr)
{
   char ch;
   set_keypress();
   istr.unsetf(ios_base::skipws);
   istr >> ch;
   istr.setf(ios_base::skipws);
   reset_keypress();
   return ch;
}
Ejemplo n.º 2
0
//=============================================================================
static string get_line_ (istream& in)
{
    string line;
    
    ios_base::fmtflags ff (in.flags());
    in.setf (ios_base::skipws);
    getline (in, line); 
    in.flags (ff);
    
    return line;
}
Ejemplo n.º 3
0
//----------------------------------------------------------------------
//    Global funcitons
//----------------------------------------------------------------------
char mygetc(istream& istr)
{
   char ch;
   set_keypress();
   istr.unsetf(ios_base::skipws);
   istr >> ch;
   istr.setf(ios_base::skipws);
   reset_keypress();
   #ifdef TEST_ASC
   cout << left << setw(6) << int(ch);
   #endif // TEST_ASC
   return ch;
}