#include "iostream.h"
#include "string"
class car
{
public:
};
void car::honk()
{
}
void main()
{car benchi,*p;
p=new car;
p->honk();
}
刚学的类,其实面向过程也差不多,就是定义几个函数,然后再调用
#include "iostream.h"
#include "string"
class car
{
public:
};
void car::honk()
{
}
void main()
{car benchi,*p;
p=new car;
p->honk();
}
刚学的类,其实面向过程也差不多,就是定义几个函数,然后再调用