Thread View: cn.bbs.comp.program
1 messages
1 total messages
Started by �Ĵ�����֮������
Wed, 06 May 1998 00:00
Re: ָ������
Author: �Ĵ�����֮������
Date: Wed, 06 May 1998 00:00
Date: Wed, 06 May 1998 00:00
40 lines
1996 bytes
1996 bytes
> [1;36m==> Knight_Wang(bighorse) ˵��: [37;40m[0m > 1���������ָ��������һ���ڴ�ռ� > �� > char *buffer; > buffer=new char[100]; > Ȼ������ > delete �ͷ��� > delete [] buffer; > ��ôָ����û�б�ɾ��ɲ����� > ����������delete [] buffer;Ȼ�� > д: > buffer=new char[12]; > �ɲ����ԡ� C�����û����ʽ�����ָ��Ķ���ɾ���Ĺ��ܣ�����ֻ������������ �Զ�ʧЧ���༴���ٱ����ա� deleteֻ���ͷ�Ϊָ������Ŀռ���ָ�뱾�? delete֮��ָ�����ݿ�����Ȼָ��ԭ������Ŀռ䣬��Ȼ�ÿռ� �Ѿ����ٱ��Ϸ��ı�������ʱ���ᱻ��Ĵ���ʹ�á� delete buffer��delete []buffer�ڴ���ʵ������һ��� �Ծ�delete buffer ��˳��Щ ��Ȼָ�������Ȼ���ڣ�buffer = new char[12]���ǿ��õ� > 2���� > char *buf; > buf=new char[12]; > buf=new char[10]; > ��ôbuf���ڴ�ռ������������ > bufָ�����µķ��䣬������ȫ��ʹ��char[10]�Ŀռ� ԭ����char[12]��Ȼ�DZ�Ϊռ��״̬������ĵ�ַ�Ѿ� ����������� -- �� ��Դ: �й�ƴ�BBSվ [bbs.ustc.edu.cn]
Thread Navigation
This is a paginated view of messages in the thread with full content displayed inline.
Messages are displayed in chronological order, with the original post highlighted in green.
Use pagination controls to navigate through all messages in large threads.
Back to All Threads