Like Tree1Likes

linked list issues

This is a discussion on linked list issues within the C++ Programming forums, part of the General Programming Boards category; Originally Posted by Ewiv std::cout is a function I know this No, std::cout is a variable....

  1. #16
    C++ Witch laserlight's Avatar
    Join Date
    Oct 2003
    Location
    Singapore
    Posts
    23,789
    Quote Originally Posted by Ewiv
    std::cout is a function I know this
    No, std::cout is a variable.
    Elysia likes this.
    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
    Posts
    4,940
    On a side note, stop using: I don't understand why books insist in teaching students this terrible practice.
    O_o

    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.

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

  3. #18
    - - - - - - - - oogabooga's Avatar
    Join Date
    Jan 2008
    Posts
    2,808
    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

Page 2 of 2 FirstFirst 12
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, 01: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, 05:37 PM
  5. Replies: 6
    Last Post: 03-02-2005, 01:45 AM

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