Thread: error c2036

  1. #16
    C++ Witch laserlight's Avatar
    Join Date
    Oct 2003
    Location
    Singapore
    Posts
    28,413
    Please label the code so we can easily tell which file is which. You have some code that is not within code bbcode tags; is it supposed to be somewhere? Also, what is the exact error message, including line number?
    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
    Cat without Hat CornedBee's Avatar
    Join Date
    Apr 2003
    Posts
    8,895
    Code:
    #include "B.h"
    #ifndef A_H
    #define A_H
    Bad style. Put includes inside the guards.

    Code:
    virtual C EX()=0;
    Invalid. C is a template, you can't use it without template parameters. What kind of C does it return? A C<int>? A C<std::string>?

    Virtual functions cannot be templates.
    All the buzzt!
    CornedBee

    "There is not now, nor has there ever been, nor will there ever be, any programming language in which it is the least bit difficult to write bad code."
    - Flon's Law

Popular pages Recent additions subscribe to a feed