间接修改指针的地址方法

文章作者 100test 发表时间 2007:12:15 13:03:06
来源 100Test.Com百考试题网


间接修改指针的地址
代码:
// 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 << "p[0] = " << p[0] << endl.
cout << "test.i = " << test.p << endl.
return 0.
}

相关文章


间接修改指针的地址方法
澳大利亚华人论坛
考好网
日本华人论坛
华人移民留学论坛
英国华人论坛