Strdup.c
上传用户:dq031136
上传日期:2022-08-08
资源大小:802k
文件大小:0k
源码类别:

VC书籍

开发平台:

C++ Builder

  1. #include <stdio.h>
  2. #include <string.h>
  3.  
  4. void main(void)
  5.   {
  6.     char *title;
  7.     if ((title = strdup("Jamsa's C/C++ Programmer's Bible")))
  8.       printf("Title: %sn", title);
  9.     else 
  10.       printf("Error duplicating string");
  11.    }
  12.       
  13.