Monday, April 27, 2015

Typedef là cách tạo ra tên mới cho một kiểu dữ liệu, typedef được dùng với các kiểu sữ liệu cơ bản, enum, union, struct và function pointer

Ex:

 typedef unsigned char BYTE;  
 BYTE b1, b2;  

 typedef struct Books  
 {  
   char title[50];  
   char author[50];  
   char subject[100];  
   int  book_id;  
 } Book;  
 Book book;  

 typedef int (*operator)(int, int);  


Leave a Reply

Subscribe to Posts | Subscribe to Comments

- Copyright © Lập trình hệ thống nhúng Linux . Powered by Luong Duy Ninh -