Advertisement
If you have a new account but are having problems posting or verifying your account, please email us on hello@boards.ie for help. Thanks :)
Hello all! Please ensure that you are posting a new thread or question in the appropriate forum. The Feedback forum is overwhelmed with questions that are having to be moved elsewhere. If you need help to verify your account contact hello@boards.ie

Easy C++ question

Options
  • 08-03-2005 3:19pm
    #1
    Registered Users Posts: 1,268 ✭✭✭


    I'm new to C++,but I've been using C for ages. I'm writing a console app and was wondering if there was any way to use unbuffered input without having to use the getch() from conio.h?


Comments

  • Registered Users Posts: 2,281 ✭✭✭DeadBankClerk


    istream& get (char& c );
    istream& get (char* s, streamsize n );
    istream& get (char* s, streamsize n, char delim );
    istream& get (streambuf& sb);
    istream& get (streambuf& sb, char delim );


    cin.get(c)


  • Registered Users Posts: 4,003 ✭✭✭rsynnott


    istream& get (char& c );
    istream& get (char* s, streamsize n );
    istream& get (char* s, streamsize n, char delim );
    istream& get (streambuf& sb);
    istream& get (streambuf& sb, char delim );


    cin.get(c)

    Erm, they're buffered, aren't they?


  • Closed Accounts Posts: 8 z00m


    Don't you really know the methods?
    int getc() / int fgetc(FILE*) - returns input character
    char * gets / char* fgets(FILE*) - returns input string


Advertisement