主题:弱弱的问一句
chosennm
[专家分:0] 发布于 2008-01-04 19:18:00
typedef char* PCHAR;
PCHAR pa, pb;
这样可以用。
那为什么可以这样呢?
typedef char Line[81];
Line text, secondline;
回复列表 (共4个回复)
沙发
shuangwen163 [专家分:730] 发布于 2008-01-04 23:19:00
我是这么理解的
Line[81]是代表char型的数组
而Line是数组名--指向数组第一个元素的头指针--即Line代表char*
板凳
3751002 [专家分:160] 发布于 2008-01-12 21:11:00
用typedef定义数组、指针、结构等类型将带来很大的方便,不仅使程序书写简单而且使意义更为明确,因而增强了可读性。
例如:
typedef char NAME[20]; 表示NAME是字符数组类型,数组长度为20。然后可用NAME 说明变量,如:
NAME a1,a2,s1,s2;
完全等效于:
char a1[20],a2[20],s1[20],s2[20]
我目前也就看过谭浩强的书。。正在努力别的。。 你自己看着办 现在我都不敢说我到底学的多少是对的了
声明:无论哪位高手就别再给我重复他的书怎么垃圾了 我只是想如果真的要成为一个好的程序员必须要有宽阔的胸襟,否则所谓的“高”也只不过是重复别人罢了
3 楼
justforfun626 [专家分:18460] 发布于 2008-01-12 22:43:00
[quote]
声明:无论哪位高手就别再给我重复他的书怎么垃圾了 我只是想如果真的要成为一个好的程序员必须要有宽阔的胸襟,否则所谓的“高”也只不过是重复别人罢了
[/quote]
I have never read his book. However, I know it is way out of date, it is still using TC.
If someone (Mr.谭浩强) is using his position/power to force almost all Chinese Universities to use his out-of-date book to make money, that is a moral issue.
Anybody 有宽阔的胸襟 must point that bad fact out, it is our responsibility!!!!
4 楼
justforfun626 [专家分:18460] 发布于 2008-01-12 23:40:00
[quote]
I have never read his book. However, I know it is way out of date, it is still using TC.
If someone (Mr.谭浩强) is using his position/power to force almost all Chinese Universities to use his out-of-date book to make money, that is a moral issue.
Anybody must point that bad fact out, it is our responsibility!!!!
[/quote]
I sincerely hope Mr.谭浩强 or someone close to him have a chance to read this post, I have 2 suggestions to him.
Mr.谭浩强 should have the power to make them happen before retiring, to do a good contribution to the Chinese IT industry!!!
Suggestions:
1) Hire somebody to update Mr.谭浩强's book, to make it up-to-date, better, correct all errors. Mr.谭浩强 can still make money from the book.
2) Allow Chinese Universities to use a different better textbook.
Thanks!
我来回复