assign values to an array created with new keyword in c++

前端 未结 0 396
醉酒成梦
醉酒成梦 2020-12-22 08:32

I have a dynamic array which I am trying to assign values to

int n = 5;
double* array;

int main(){
    array = new double[n];
    array[1] = 2;
    printf(&q         


        
相关标签:
回答
  • 消灭零回复
提交回复
热议问题