#include<stdio.h> #include<string.h> #include<stdlib.h> typedef struct node{ errno_t (*fp_strcpy_s)(char * , rsize_t , const char * ); size_t (*fp_strlen)( const char * ); int (*fp_strcmp)( const char * , const char * ); }stringutil; stringutil g_string={strcpy_s,strlen,strcmp}; int main(){ char a[20]; char b[10]="nihaodsd"; printf("%d ",g_string.fp_strlen("nihao")); printf("%d ",g_string.fp_strcmp("aaa","aaa")); printf("%d ",g_string.fp_strcpy_s(a,g_string.fp_strlen(b)+1,b)); printf("%s ",a); return 0; }