a question about syntax of declaration with inheritance...

Discussion in 'C++' started by SpreadTooThin, Mar 29, 2007.

  1. If this is the implementation of the method in the cpp file:

    dbgBuf(std::streambuf* output_buffer) : buffer(output_buffer),
    at_start(true), level(0), log_on(true)
    {
    }

    What should the declaration of the method look like in the header file?
    SpreadTooThin, Mar 29, 2007
    #1
    1. Advertising

  2. SpreadTooThin wrote:
    > If this is the implementation of the method in the cpp file:
    >
    > dbgBuf(std::streambuf* output_buffer) : buffer(output_buffer),
    > at_start(true), level(0), log_on(true)
    > {
    > }
    >
    > What should the declaration of the method look like in the header
    > file?


    Judging by the presence of what looks like an initialiser list,
    it should be a constructor. But the name of this function is not
    proper, it lacks the class name, so it can't be an out-of-class
    definition of a member. Any out-of-class definition has the
    qualified name form (blah::foo or damnit::bar).

    V
    --
    Please remove capital 'A's when replying by e-mail
    I do not respond to top-posted replies, please don't ask
    Victor Bazarov, Mar 29, 2007
    #2
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Noah
    Replies:
    5
    Views:
    957
  2. barry
    Replies:
    11
    Views:
    4,632
    Thomas G. Marshall
    Oct 17, 2003
  3. Replies:
    1
    Views:
    390
    Peter Davis
    Dec 14, 2004
  4. Alex Vinokur
    Replies:
    4
    Views:
    584
    Jonathan Turkanis
    Apr 5, 2004
  5. Ovidesvideo
    Replies:
    4
    Views:
    507
    Andrey Tarasevich
    Dec 10, 2004
Loading...

Share This Page