[問題] struct宣告的問題
開發平台(Platform): (Ex: VC++, GCC, Linux, ...)
Dev C
額外使用到的函數庫(Library Used): (Ex: OpenGL, ...)
問題(Question):
struct ttt1{
char a;
}test1;
struct {
unsigned char a;
}test2;
typedef struct{
unsigned char a;
}test3;
typedef struct ttt2{
unsigned char a;
}test4;
請教一下, struct在宣告時我看過上面4種宣告方式,
這4種方式有什麼不同丫?
使用上又有什麼值得注意的呢?
此外, "struct"之後有無名稱又有什麼差別呢?
最近在學struct, 有點被搞亂了.
謝謝.
--
※ 發信站: 批踢踢實業坊(ptt.cc)
◆ From: 218.210.106.78
→
01/10 17:42, , 1F
01/10 17:42, 1F
→
01/10 17:42, , 2F
01/10 17:42, 2F
→
01/10 17:42, , 3F
01/10 17:42, 3F
→
01/10 17:43, , 4F
01/10 17:43, 4F
→
01/10 17:46, , 5F
01/10 17:46, 5F
→
01/10 17:48, , 6F
01/10 17:48, 6F
→
01/10 21:46, , 7F
01/10 21:46, 7F
→
01/11 00:02, , 8F
01/11 00:02, 8F
→
01/11 13:19, , 9F
01/11 13:19, 9F
→
01/11 13:20, , 10F
01/11 13:20, 10F
→
01/11 20:39, , 11F
01/11 20:39, 11F
→
01/11 20:41, , 12F
01/11 20:41, 12F
→
01/11 20:41, , 13F
01/11 20:41, 13F
→
01/17 09:14, , 14F
01/17 09:14, 14F