专注于互联网--专注于架构

最新标签
网站地图
文章索引
Rss订阅

首页 »C语言教程 » 如何修改鼠标指针:间接修改指针的地址 »正文

如何修改鼠标指针:间接修改指针的地址

来源: 发布时间:星期四, 2008年9月25日 浏览:25次 评论:0
间接修改指针的地址
代码:
//testforapointer.cpp:Definestheentrypointfortheconsoleapplication.
//
#include\"stdafx.h\"
#include<iostream>
usingnamespacestd;
typedefstruct
{
int*p;
}Test;
intmain()
{
int*p;
//p[0]=4;
//p[1]=3;

Testtest;

p=(int*)&test;

p[0]=1;
cout<<\"p[0]=\"<<p[0]<<endl;
cout<<\"test.i=\"<<test.p<<endl;
return0;
}

相关文章

读者评论

  • 共0条 分0页

发表评论

  • 昵称:
  • 内容: