L33T 5K00L

Would you like to react to this message? Create an account in a few clicks or log in to continue.

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


    More on Cin and Cout part 2

    Poll

    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
    GroupZero
    GroupZero
    Admin
    Admin


    Male
    Number of posts : 572
    Age : 29
    Description : I'm You!
    Reputation : 11867
    Registration date : 2009-02-25

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

    Post  GroupZero 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 747946730@qq.com or join my forum and ask for it in the C++ section. The address to my forum is https://l33t5k00l.forumotion.com/, 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 http://www.mediafire.com/?menz1xjkfdn

      Current date/time is Fri Apr 26, 2024 2:13 pm