cout

This is a discussion on cout within the C++ Programming forums, part of the General Programming Boards category; what does "cout" mean.... what does it do, I find Im typign it alot... even in the lil "hello world!" ...

  1. #1
    Registered User
    Join Date
    Jun 2002
    Posts
    33

    Question cout

    what does "cout" mean.... what does it do, I find Im typign it alot... even in the lil "hello world!" source.
    this is my signature. k thx

  2. #2
    Registered User Azuth's Avatar
    Join Date
    Feb 2002
    Posts
    236
    cout is a member of the ostream class, and provides output to the standard output stream (more often than not the screen, but not limited to just that)

    http://www.cplusplus.com/doc/tutorial/tut1-4.html
    http://www.cplusplus.com/ref/iostream/ostream/

    Browse, read, learn, enjoy.
    Demonographic rhinology is not the only possible outcome, but why take the chance

  3. #3
    Banned Troll_King's Avatar
    Join Date
    Oct 2001
    Posts
    1,784
    hmm, well first of all it is pronounced as 'Edited by moderator'.

    As far as what it does, look it up in a textbook or ask your teacher.

  4. #4
    Registered User Mario's Avatar
    Join Date
    May 2002
    Posts
    317
    Cout - "C Out". As in "C Output"
    Cin - "C In". As in "C Input"

    And don't read Troll_King's first line
    Regards,
    Mario Figueiredo
    Using Borland C++ Builder 5

    Read the Tao of Programming
    This advise was brought to you by the Comitee for a Service Packless World

  5. #5
    Registered User
    Join Date
    Jun 2002
    Posts
    33
    thanks mario and azuth, lmao troll king. Thanks for the links and expecially that basic understanding mario just told me... makes sense 10x +
    this is my signature. k thx

  6. #6
    Registered User
    Join Date
    Jun 2002
    Posts
    33
    Okay, i have been reading atutorial on C++ but it never explains what "int" is for..... from all these questions you can tell im really interested in becoming a C++ programmer. Will someone give me a basic understanding of what it means (like the cout thing)... thanks.
    this is my signature. k thx

  7. #7
    Registered User
    Join Date
    Jun 2002
    Posts
    13
    "int" is a keyword. it is used to denote an integer value, or a pointer to an integer ie
    Code:
    int *p
    All variables must be declared in a similar manner:
    Code:
    variabletype variablename
    A pointer has an asterisk before the variablename. Note that any structs, classes, or pointers must be allocated. Since these are more complex, I would suggest you find a tutorial to explain them. If you want a place to start, I would suggest the one on this site. Also, for reference on the basics I'd suggest that you pick up a copy of "The C Programming Language" 2nd edition by Kernighan and Ritchie. It is a C reference, but is a good place to get grounded on the basics, since C++ was based on C.

  8. #8
    Banned borko_b's Avatar
    Join Date
    Jun 2002
    Location
    Well... I live in Bulgaria :)
    Posts
    100
    cout is :

    (c)onsole (out)

    cin is:

    (c)onsole (in)

  9. #9
    Registered User
    Join Date
    May 2002
    Posts
    51
    you don't learn very much by reading tutorials, have a look at:

    http://newdata.box.sk/bx/c/index.htm

    there you'll find a whole book

  10. #10
    Registered User rmullen3's Avatar
    Join Date
    Nov 2001
    Posts
    330
    cout stands for console output. It's an object of the ostream class. cin stands for console input, it's an object of the istream class (I think).

    Int is a keyword used in C/C++ for declaring integer types which are usually 32 bits in size.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. class methods to cout stream
    By shintaro in forum C++ Programming
    Replies: 5
    Last Post: 11-11-2008, 07:27 PM
  2. cout vs std::cout
    By none in forum C++ Programming
    Replies: 10
    Last Post: 07-27-2004, 12:20 AM
  3. changing cout output
    By Yohumbus in forum C++ Programming
    Replies: 1
    Last Post: 10-23-2002, 05:09 AM
  4. Redirecting cout stream
    By Arrow Mk84 in forum C++ Programming
    Replies: 1
    Last Post: 10-08-2002, 05:17 PM
  5. printf vs cout
    By RyeDunn in forum C++ Programming
    Replies: 5
    Last Post: 07-09-2002, 05:26 PM

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