Like Tree2Likes
  • 2 Post By whiteflags

Differenc between cin.get() and cin.getline() in c++

This is a discussion on Differenc between cin.get() and cin.getline() in c++ within the C++ Programming forums, part of the General Programming Boards category; Can any one plese tell me what is the difference between cin.get() and cin.getline() . in c++ ..................and what is ...

  1. #1
    Registered User
    Join Date
    Oct 2013
    Location
    India
    Posts
    39

    Differenc between cin.get() and cin.getline() in c++

    Can any one plese tell me what is the difference between cin.get() and cin.getline(). in c++ ..................and what is the use of cin.ignore().........explain with some examples ???


    guys thank u in advance...............

  2. #2
    Registered User whiteflags's Avatar
    Join Date
    Apr 2006
    Location
    United States
    Posts
    7,762
    Sure I mean it's not like you could search the Web or something. Oh wait, you can.

    istream::ignore - C++ Reference

    istream::getline - C++ Reference

    istream::get - C++ Reference

    Examples of each function are available at the provided links. You will need to read in any event to get proper usage out of anything. The cin.get() and cin.getline() functions that operate on C-strings are basically inferior to the std::string version, which you can read about here:

    getline (string) - C++ Reference
    Salem and Elysia like this.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Replies: 3
    Last Post: 12-13-2011, 07:32 AM
  2. Help me out with cin.getline()
    By chottachatri in forum C++ Programming
    Replies: 5
    Last Post: 02-12-2008, 06:29 AM
  3. help with getline() please.
    By System_159 in forum C++ Programming
    Replies: 8
    Last Post: 08-30-2006, 01:10 PM
  4. difference between getline and cin.getline
    By bartinla in forum C++ Programming
    Replies: 3
    Last Post: 11-13-2004, 09:47 AM

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21