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
Hi there,
There is an issue with role permissions that is being worked on at the moment.
If you are having trouble with access or permissions on regional forums please post here to get access: https://www.boards.ie/discussion/2058365403/you-do-not-have-permission-for-that#latest

Easy C++ question

  • 08-03-2005 2:19pm
    #1
    Registered Users, Registered Users 2 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, Registered Users 2 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, Registered Users 2 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