Thread: linked list issues

  1. #16
    C++ Witch laserlight's Avatar
    Join Date
    Oct 2003
    Quote Originally Posted by Ewiv
    std::cout is a function I know this
    No, std::cout is a variable.
    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

  2. #17
    Master Apprentice phantomotap's Avatar
    Join Date
    Jan 2008
    On a side note, stop using: I don't understand why books insist in teaching students this terrible practice.

    So instead you spread the opposite advice which equally awful?

    Without using directives, `namespace' would be no different than any label affix as you'd use in C with macro segments.

    “Salem Was Wrong!” -- Pedant Necromancer
    “Four isn't random!” -- Gibbering Mouther

  3. #18
    - - - - - - - - oogabooga's Avatar
    Join Date
    Jan 2008
    More precisely, std::cout is an object variable of type std::ostream. An example of a related function is std::cout.flush().

    As for the using namespace std directive, the real mistake there is to put it into a header file at global scope. That should be avoided since it forces it on the user of the header.
    The cost of software maintenance increases with the square of the programmer's creativity. - Robert D. Bliss

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Replies: 13
    Last Post: 09-22-2013, 10:34 PM
  2. Linked List Issues
    By Sorinx in forum C Programming
    Replies: 13
    Last Post: 12-10-2012, 02:19 PM
  3. single linked list to double linked list (help)
    By Countfog in forum C Programming
    Replies: 8
    Last Post: 04-29-2008, 08:04 PM
  4. singly linked list to doubly linked list
    By t48j in forum C Programming
    Replies: 3
    Last Post: 03-23-2005, 06:37 PM
  5. Replies: 6
    Last Post: 03-02-2005, 02:45 AM