标题:『*****C程序找错*****』
只看楼主
以中
Rank: 3Rank: 3
来 自:长沙
等 级:论坛游侠
帖 子:108
专家分:129
注 册:2010-4-13
得分:0 
#include <stdlib.h>         /* For _MAX_PATH definition */
#include <stdio.h>
#include <malloc.h>

void main( void )
{
   char *string;

   /* Allocate space for a path name */
   string = (char *) malloc( _MAX_PATH );

   // In a C++ file, explicitly cast malloc's return.  For example,
   // string = (char *)malloc( _MAX_PATH );

   if( string == NULL )
      printf( "Insufficient memory available\n" );
   else
   {
      printf( "Memory space allocated for path name\n" );
      free( string );
      printf( "Memory freed\n" );
   }
}

道之所存,师之所存。
2010-10-13 17:38



参与讨论请移步原网站贴子:https://bbs.bccn.net/thread-322709-1-1.html




关于我们 | 广告合作 | 编程中国 | 清除Cookies | TOP | 手机版

编程中国 版权所有,并保留所有权利。
Powered by Discuz, Processed in 0.369635 second(s), 7 queries.
Copyright©2004-2024, BCCN.NET, All Rights Reserved