new lien c++

  1. Use the "new" keyword to allocate memory for a new object or data type in C++.
  2. Specify the data type of the object or data type being allocated memory.
  3. Use parentheses to call the constructor, if necessary, for the object being created.
  4. Assign the memory address returned by the "new" keyword to a pointer of the specified data type.