no_free.cpp

来自「这是《C/C++程序员实用大全》上面的源码」· C++ 代码 · 共 18 行

CPP
18
字号
#include <iostream.h>

void main(void)
 {
   char *pointer;

   do 
   {
     pointer = new char[10000];

     if (pointer)
       cout << "Allocated 10,000 bytes\n";
     else
       cout << "Allocation failed\n";
   } while (pointer);
 }

⌨️ 快捷键说明

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