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

  1. #1
    Deleted Account
    Join Date
    Oct 2013

    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
    Lurking whiteflags's Avatar
    Join Date
    Apr 2006
    United States
    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

Popular pages Recent additions subscribe to a feed

Similar Threads

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