初学VC,请教一个问题!感谢各位
// test.cpp : Defines the entry point for the console application.
//
#include "stdafx.h"
#include <iostream.h>
class Shape
{
public:
virtual void draw() = 0;
};
class Rectangle: public Shape
{
public:
void draw()
{
printf("ddddddd");
}
};
class Circle : public Shape
{
public:
void draw()
{
printf("ddddddd");
}
};
int main(int argc, char* argv[])
{
Shape a;
return 0;
}
为什么编译 时老说我没有实例话这个类呢?谢谢大家回答!