#include<iostream>
using namespace std; class A
{
public:
int x;
int sayhello()
{
cout<<"hello world"<<endl;
}
}; class B:public A
{ }; typedef int A::*int_pointer;
typedef int (A::*FP)(); int main()
{
int A::*pointer1 = &A::x;
int_pointer pointer2 = &A::x;
A a;
a.*pointer1 = ;
++(a.*pointer2);
cout << &a->*pointer1 << endl; B b;
a.sayhello();
int (A::*classAfunctionpointer1)();
classAfunctionpointer1 = &A::sayhello;
FP classAfunctionpointer2 = &A::sayhello;
(a.*classAfunctionpointer1)();
(a.*classAfunctionpointer2)();
(&a->*classAfunctionpointer1)();
(b.*classAfunctionpointer1)(); return ;
}

最新文章

  1. MVC Core 网站开发(Ninesky) 2.1、栏目的前台显示(补充)
  2. 【单页应用巨坑之History】细数History带给单页应用的噩梦
  3. js的this和面向对象编程
  4. 我的第一节Android课
  5. Chrome浏览器插件推荐大全
  6. 转:DataTable的Compute方法的应用
  7. 说不尽的MVVM(5) - 消息满天飞
  8. 斜堆(二)之 C++的实现
  9. 让你的linux操作系统更加安全【转】
  10. 聚簇(Cluster)和聚簇表(Cluster Table)
  11. Windows10输入法的切换
  12. CSS3 keyframes动画实现弹跳效果
  13. 转载:struts2和spring的结合原理(精品)
  14. Hbase Region Server 启动失败
  15. CHM木马
  16. MyBatis和SpringMVC集成事务在Junit测试下有效但是在实际项目无效的问题
  17. 转:Loadrunner学习知多少--脚本录制下载操作
  18. 如何在README.md文件中添加图片
  19. Cocos2Dv3.4在AppDelegate中不返回的情况及解决
  20. Django 之 流程和命令行工具

热门文章

  1. Spring集成Mybatis,spring4.x整合Mybatis3.x
  2. Weblogic(CVE-2017-10271)漏洞复现
  3. Android开发-- 简单对话框
  4. HttpClient(四)-- 使用代理IP 和 超时设置
  5. Splash resource_timeout 属性
  6. python3.4连接和读取oracle数据表
  7. java 读写文件例子
  8. MDU某产品OMCI模块代码质量现状分析
  9. OGG 3节点级联时 关键参数
  10. ESlint全局变量报错