handle user input of unknown size
CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 3 of 3

Thread: handle user input of unknown size

Hybrid View

  1. #1
    Join Date
    Mar 2011
    Posts
    16

    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
    Location
    West Virginia
    Posts
    7,560

    Re: handle user input of unknown size

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

    http://www2.research.att.com/~bs/new_learning.pdf

  3. #3
    Join Date
    Mar 2011
    Posts
    16

    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
  •  


Azure Activities Information Page

Windows Mobile Development Center


Click Here to Expand Forum to Full Width

This is a CodeGuru survey question.


Featured


HTML5 Development Center