decoding code

This is a discussion on decoding code within the C++ Programming forums, part of the General Programming Boards category; Code: do{ infile >> c; }while (c != 5 && c != 9); b = 7-c; b = b*b; cout ...

  1. #1
    Registered User
    Join Date
    Oct 2009
    Posts
    13

    decoding code

    Code:
    	 do{
       infile >> c;
    }while (c != 5 && c != 9);
    b = 7-c;
    b = b*b;
    cout << "b= " << b;
    if (c < 10)
       cout << "yes\n";
    else
       cout << "no\n";
    cout << "End of part a\n";
    could someone please explain what infile >> c; means and what it does?

  2. #2
    and the Hat of Guessing tabstop's Avatar
    Join Date
    Nov 2007
    Posts
    14,185
    You know what cin >> c does; why should this be different?

  3. #3
    Registered User
    Join Date
    Oct 2009
    Posts
    13
    I don't know. I have never seen it before.

  4. #4
    and the Hat of Guessing tabstop's Avatar
    Join Date
    Nov 2007
    Posts
    14,185
    Quote Originally Posted by C++Newb View Post
    I don't know. I have never seen it before.
    Which is no excuse.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Extended ASCII Characters in an RTF Control
    By JustMax in forum C Programming
    Replies: 18
    Last Post: 04-03-2009, 08:20 PM
  2. Enforcing Machine Code Restrictions?
    By SMurf in forum Tech Board
    Replies: 21
    Last Post: 03-30-2009, 07:34 AM
  3. Obfuscated Code Contest
    By Stack Overflow in forum Contests Board
    Replies: 51
    Last Post: 01-21-2005, 03:17 PM
  4. Interface Question
    By smog890 in forum C Programming
    Replies: 11
    Last Post: 06-03-2002, 05:06 PM
  5. Replies: 0
    Last Post: 02-21-2002, 05:05 PM

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