您的位置:首页 > 编程语言 > C语言/C++

一段使用C++的奇怪代码

2008-07-20 10:41 435 查看
linjiangbin02// Dev.cpp : Defines the entry point for the console application.
//

#include "stdafx.h"

class A
{
public:
int a;
void ak()
{
int t = 0;
this->a = 9;
}
void Release()
{
delete this;
}
};

class B
{
public:
int b;
};

class C :public B,public A
{
public:
int c;
void ak()
{
int t = 0;
}
};

int main()
{
C* p= new C;

p->ak();
p->Release();

return 0;
}

.
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: