Current location - Plastic Surgery and Aesthetics Network - Plastic surgery and beauty - Int a = new Int(I); What does this mean? What is the difference between an integer array and an object array?
Int a = new Int(I); What does this mean? What is the difference between an integer array and an object array?
Int *a=new Int(N) is written in c++, which means that an int space is allocated to the integer pointer A, and the initial value n is assigned to this int * a, which is equivalent to the preparation of the constructor.

An integer array means that every element in the array is an integer type.

An object array means that every element in the array is an object of a class. When assigning a value, define the object first, and then assign the object directly to the array. When used, for example, Node node[2]={Node(2), node (5)}; //(assuming that the constructor has only one parameter)