f********f 发帖数: 290 | 1 今天在看一个行业里的软件的文件头,
发现所有的定义都是:
struct Line_s
{
....
};
typedef Line_s Line_t;
为什么要变作_t的?这个有什么讲究么?除了以后改代码方便,比如
struct Line_New_s
{
....
};
typedef Line_s Line_t;
还有别的好处么?
thanks | f********f 发帖数: 290 | 2 哦,thanks
我一直搞不明白这个t是代表什么,呵呵 | f********f 发帖数: 290 | | l******e 发帖数: 13 | 4 To avoid confusion, you can also typedef it to itself:
typedef your_struct_type
{
...
}your_struct_type; | a*****1 发帖数: 11 | 5 r u using C? where's the keyword 'struct'?
【在 l******e 的大作中提到】 : To avoid confusion, you can also typedef it to itself: : typedef your_struct_type : { : ... : }your_struct_type;
|
|