COM实用入门教程
深度探索C++对象模型.pdf
// ConsoleApplication1.cpp : Defines the entry point for the console application.
//
#include "stdafx.h"
#include <iostream>
using namespace std;
class A;
void MyPrint(A* a);
class A
{
private:
int value;
public:
void setvalue(int value)
{
this->value = value;
this->value += 3;
MyPrint(this);
}
void print()
{
cout << value << endl;
}
};
void MyPrint(A* a)
{
a->print();
}
int _tmain(int argc, _TCHAR* argv[])
{
A a;
a.setvalue(33);
return 0;
}
阅读(908) | 评论(0) | 转发(0) |