Possible Duplicate:
What does `class HelloWorld : public Gtk::Window` mean?
I’m new to C++, but looked at a few tutorials and read partially Accelerated C++ … but have seen something like
class expr_t : public ast_container {
public:
virtual double eval() const = 0;
...
What does the 1st line mean? Its declaring a class named expr_t? Then whats ast_container part?
Then on line 3: virtual double eval() const = 0 what does it mean?
- Seems like its declaring a virtual function called
evalthat returns a double, but then whats theconst = 0part?
It means that the parent class/super class/(whatever one calls it) of the
expr_tclass is theast_containerclass. At first glance, it roughly means that everythingast_containercan do,expr_tcan do it as well, and something more too.