Take the 2-minute tour ×  I am learning c++ inheritance and I
come from Java. To train, I made a small java example and tried
to convert it to c++ but my c++ implementations has many
problems.  This is my interface IShape.java. It represents the
abstraction of a Shape.  public interface IShape {     public
void draw();  And this is my Triangle.java that implements
Shape.  public class Triangle implements IShape{     public void
draw() {         //draw code  And now the Main.java:  public
class Main {     public static void main(String[] args) {
IShape someShape = new Triangle();  Everything works nice and
dandy in java, but my c++ version is doesn't even compile :S
This is my IShape.h c++ file. It is supposed to be like the
IShape.java interface.  #ifndef ISHAPE_H_ #define ISHAPE_H_
class IShape{      virtual void draw() = 0;      //must have
this because of compiler     virtual ~IShape();     //an awesome
thing in c++ is that I can also define private methods for my
children to implement!     virtua