a2i.c

来自「cygwin下的包含各种c基本操作的demo程序」· C语言 代码 · 共 52 行

C
52
字号
// a2i#include "my_common.h"#ifdef __cplusplusextern "C"  {#endif//#define _a2i_debugint a2i(char *str){    int ii=0;        while ( (*str) != '\0' )    {         	    #ifdef _a2i_debug    	    printf("%c ",*str);    	    #endif         	ii =(*str - 48) + ii*10;//good         	str++;         	    }		   	  #ifdef _a2i_debug    printf("\n");    #endif	    	     		  return ii;}void fun_p(char *str){     printf("I am the real fuc_p, your %s \n",str);}void test_ll(void){    link_list *a = (link_list*)malloc(sizeof(link_list));	    a->data = 11;    a->next = NULL;		  printf("the size of link_list is %d \n",sizeof(link_list));	  printf("the value of a->data is %d \n",a->data);	  return ;}#ifdef __cplusplus            }#endif

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?