Thread: what is the library for cout <<, the compiler is not recognizing it.

  1. #1
    Registered User
    Join Date
    Jul 2011
    Posts
    1

    what is the library for cout <<, the compiler is not recognizing it.

    This is what I got when I tried to compile it.. >

    test.cpp:15: error: ‘cout’ was not declared in this scope

  2. #2
    C++ Witch laserlight's Avatar
    Join Date
    Oct 2003
    Location
    Singapore
    Posts
    28,413
    You should #include <iostream>. Also, keep in mind that cout is from the std namespace.
    Quote Originally Posted by Bjarne Stroustrup (2000-10-14)
    I get maybe two dozen requests for help with some sort of programming or design problem every day. Most have more sense than to send me hundreds of lines of code. If they do, I ask them to find the smallest example that exhibits the problem and send me that. Mostly, they then find the error themselves. "Finding the smallest program that demonstrates the error" is a powerful debugging tool.
    Look up a C++ Reference and learn How To Ask Questions The Smart Way

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Replies: 3
    Last Post: 04-29-2009, 06:42 AM
  2. Replies: 4
    Last Post: 09-02-2007, 08:47 PM
  3. Easiest 2D drawing library for bloodshed compiler?
    By thunderchief in forum C++ Programming
    Replies: 5
    Last Post: 11-12-2005, 02:25 PM
  4. help with compiler trouble. Cout verification?
    By bigd5 in forum C++ Programming
    Replies: 6
    Last Post: 05-31-2005, 07:22 PM
  5. Recognizing Spaces
    By BigSter in forum C++ Programming
    Replies: 4
    Last Post: 05-25-2002, 01:17 AM