间接修改指针的地址

文章作者 100test 发表时间 2008:03:31 11:51:22
来源 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.
}

相关文章


货代综合辅导:如何向货主报价才能成功
货代综合辅导:外贸,如何培养与客人的感情
C编译器怎么样对内存划分和使用
间接修改指针的地址
VC下Debug和Release区别
澳大利亚华人论坛
考好网
日本华人论坛
华人移民留学论坛
英国华人论坛