六狼论坛

 找回密码
 立即注册

QQ登录

只需一步,快速开始

新浪微博账号登陆

只需一步,快速开始

搜索
查看: 38|回复: 0

const的使用

[复制链接]

升级  96%

154

主题

154

主题

154

主题

举人

Rank: 3Rank: 3

积分
488
 楼主| 发表于 2013-1-26 12:28:02 | 显示全部楼层 |阅读模式
http://www.iteye.com/images/smiles/icon_wink.gif

a) 一个整型数(An integer
int a
b) 一个指向整型数的指针(A pointer to an integer
int *a
c) 一个指向指针的的指针,它指向的指针是指向一个整型数(A pointer to a pointer to an integer))
int **a
d) 一个有10个整型数的数组(An array of 10 integers
int a[10]
e) 一个有10个指针的数组,该指针是指向一个整型数的(An array of 10 pointers to integers
int *a[10]
f) 一个指向有10个整型数数组的指针(A pointer to an array of 10 integers
int (*a)[10]
g) 一个指向函数的指针,该函数有一个整型参数并返回一个整型数(A pointer to a function that takes an integer as an argument and returns an integer
int (*a)(int);
h) 一个有10个指针的数组,该指针指向一个函数,该函数有一个整型参数并返回一个整型数( An array of ten pointers to functions that take an integer argument and return an integer ))
int (*a[10])(int);
您需要登录后才可以回帖 登录 | 立即注册 新浪微博账号登陆

本版积分规则

快速回复 返回顶部 返回列表