在用户态下使用uint64_t
                                                            生活随笔
收集整理的這篇文章主要介紹了
                                在用户态下使用uint64_t
小編覺得挺不錯的,現在分享給大家,幫大家做個參考.                        
                                
                            
                            
                            #include <stdio.h>
#include <stdint.h>typedef struct
{unsigned short msg_type;unsigned short msg_len;//msg body len
}st_msg_h;typedef struct{char audio_name[64];uint64_t time_stamp;//輸入的要播放的時間戳絕對時間int dec_ch;}st_msg_start;typedef struct
{st_msg_h msg_h;//消息頭union {int msg_speed;//A_SPEEDst_msg_start msg_start;//A_STRAT}msg_body;
}st_audio_msg;int main()
{int a, b, c;printf("long long=%d, uint64_t=%d\n", sizeof(long long), sizeof(uint64_t));a = sizeof(st_msg_h);b = sizeof(st_msg_start);c = sizeof(st_audio_msg);printf("a=%d, b=%d, c=%d\n", a, b, c);return 0;
}
 
 
 
                            
                        
                        
                        
 
關鍵是包含頭文件: stdint.h
運行結果:
[feng@other #34]$make gcc -o a a.c [feng@other #35]$./a long long=8, uint64_t=8 a=4, b=76, c=80總結
以上是生活随笔為你收集整理的在用户态下使用uint64_t的全部內容,希望文章能夠幫你解決所遇到的問題。
 
                            
                        - 上一篇: 微服务框架开发(二)—扩展spring
- 下一篇: MapReduce中的InputForm
