char *buff;
buff=(char*)malloc(sizeof(char)*len);
[C] Assign buffer size to pointer char
Related Posts:
[C][Pointer][Book] Understanding and Using C Pointer pci is a variable const int *pci pci is a pointer variable const int *pci pci is a pointer variable to an integer const … Read More
[C] Use graph to show the structure of C /* rfc2030 * 1 2 3 * 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 * +… Read More
[C Example] Deal with file #include <stdio.h> #include <sys/stat.h> #include <fcntl.h> #include <errno.h> void happy(unsigned char *buffer, unsigned in… Read More
[C] Define Standard h file std_types.h #ifndef STD_TYPES #define STD_TYPES /* enum Bool - Boolean Type */ typedef enum { False = 0, True = 1 } Bool; typedef int … Read More
[C] How to get device ip Usage : char eth16[16]={0}; GetDeviceIP(“eth16”, eth16) static int GetDeviceIP(char* device, char* ipaddr) { int sockfd; struct ifreq req; … Read More
0 意見:
張貼留言