间接修改指针的地址方法

间接修改指针的地址方法,第1张

间接修改指针的地址方法,第2张

间接修改指针的地址
代码:
// test for a pointer.cpp : Defines the entry point for the console application.
//
#include "stdafx.h"
#include
using namespace std;
typedef struct
{
int *p;
}Test;
int main( )
{
int *p;
// p[0] = 4;
// p[1] = 3;

Test test;

p = (int *)&test;

p[0] = 1;
cout

DABAN RP主题是一个优秀的主题,极致后台体验,无插件,集成会员系统
白度搜_经验知识百科全书 » 间接修改指针的地址方法

0条评论

发表评论

提供最优质的资源集合

立即查看 了解详情