CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 3 of 3
  1. #1
    Join Date
    Mar 2011

    Post handle user input of unknown size

    how to implement an acceptance of unknown input size (during console entry by user) in a char array, like the way std::string does? (m using gcc/g++ under ubuntu)?

  2. #2
    Join Date
    Aug 2000
    West Virginia

    Re: handle user input of unknown size

    see the code starting on page 3 from the Stroustrup paper
    on learning C++ ...


  3. #3
    Join Date
    Mar 2011

    Re: handle user input of unknown size

    my understanding of getchar() was a bit different...i thought getchar() gets a character from the user and requires <CR> to be pressed after every char. input...getch() under curses library with line-buffering off does it..however i wanted it without any additional libraries if possible...but bjarne wrote that so i think its my understanding that's a bit off...can u explain.

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Windows Mobile Development Center

Click Here to Expand Forum to Full Width

On-Demand Webinars (sponsored)

We have made updates to our Privacy Policy to reflect the implementation of the General Data Protection Regulation.