boards

本页内容为未名空间相应帖子的节选和存档,一周内的贴子最多显示50字,超过一周显示500字 访问原贴
Programming版 - [合集] C++ simple question
相关主题
请教一下,exception时,destructor一定会被调用么?
问个C++中重复删除指针的问题
one question about overloading operator delete
How to return an array in a C++ function?
C++中如果处理数组的维数中的负数?
问个double和long double的问题
问个g++的问题
a C++ question
C++编程问题:union inside struct
a question about CAST
相关话题的讨论汇总
话题: c++话题: delete话题: double话题: what话题: new
进入Programming版参与讨论
1 (共1页)
b***y
发帖数: 2799
1
☆─────────────────────────────────────☆
baodong (馋懒大魔包) 于 (Thu Sep 1 16:11:25 2005) 提到:
Hello, I am a newbie of C++. Thanks for your time.
Who can tell me why the following code gives a funny error? It works if I use
delete [] a,b; What is the differenc of delete [] a,b; and delete [] a;
delete [] b;
What will the compiler do with a = new double [0]?
Many thanks
int main(void)
{
for (int j=0; j<5; j++)
{
double *a, *b;
a = new double [j];
b = new double [3];
1 (共1页)
进入Programming版参与讨论
相关主题
a question about CAST
请教一个2维动态矩阵的问题
float -> double, double -> long double (C++)
C++ question
请教一个const pointer的问题
问个矩阵作为参数, C programming的问题
double's equality
c++这两种写法有啥本质区别?
C++求助: New/Delete in Multidimensioned array
C++ pointer problem
相关话题的讨论汇总
话题: c++话题: delete话题: double话题: what话题: new