Talk about video games, put up incredible polls, and go insane

    More on Cin and Cout part 2


    Did this helped?

    [ 3 ]
    More on Cin and Cout part 2 I_vote_lcap100%More on Cin and Cout part 2 I_vote_rcap [100%] 
    [ 0 ]
    More on Cin and Cout part 2 I_vote_lcap0%More on Cin and Cout part 2 I_vote_rcap [0%] 

    Total Votes: 3

    Number of posts : 572
    Age : 24
    Description : I'm You!
    Reputation : 8337
    Registration date : 2009-02-25

    More on Cin and Cout part 2 Empty More on Cin and Cout part 2

    Post  GroupZero on Tue Oct 13, 2009 5:17 pm

    cin.get(var) function
    This function does the same thing as cin, but it only reads in one character, and it must be a char variable. Oh and btw, numbers considers a character too, you can still input a number, but the variable must be a char. Also, this function only reads in one character. If you have more, there will be an input failure. I don’t think this function is very useful.

    cin.ignore(intN, chC) function
    This function must be used after cin. It ignores the input until it reaches N numbers of character or reaches a character defined by you. cin.ignore(80,’E’); will ignore 80 characters/numbers, counting spaces, until it hits E and then will input the rest in to another cin input. I don’t use cin.ignore this way when I program, I don’t want to confuse you. So if you want to know it, email me at or join my forum and ask for it in the C++ section. The address to my forum is, please join us!

    cin.clear() function
    Clears the input function cin after the user enters something wacky or not the variable type you wanted him/her/it to enter. It just resets cin after it fails.

    Download Link for DOCX File

    War Is The New Peace
    More on Cin and Cout part 2 116q5av

      Current date/time is Thu Jun 27, 2019 6:29 am