About 5,110,000 results
Open links in new tab
  1. c++ - How do I create an array of pointers? - Stack Overflow

    Aug 5, 2009 · In C++, for most use cases life is easier with a std::vector. Now you can use push_back () to add new pointers to it and [] to index it. It is cleaner to use than the ** thing. If …

  2. Creating array of pointers in C++ - GeeksforGeeks

    Jun 23, 2022 · An array of pointers is an array of pointer variables. It is also known as pointer arrays. We will discuss how to create a 1D and 2D array of pointers dynamically. The word …

  3. creating an array of object pointers C++ - Stack Overflow

    I want to create an array that holds pointers to many object, but I don't know in advance the number of objects I'll hold, which means that I need to dynamically allocate memory for the …

  4. C++ - Array of pointers to classes - Stack Overflow

    Jun 5, 2014 · If your classes all have a common base class then you can define your array to contain pointers to that base class then you can add classes to the array as you have done. In …

  5. Pointer to an Array in C++ - GeeksforGeeks

    Feb 7, 2024 · In C++, we can manipulate arrays by using pointers to them. These kinds of pointers that point to the arrays are called array pointers or pointers to arrays. In this article, …

  6. Learn to Use Object Arrays and Object Pointer Arrays in C++

    May 3, 2021 · Object Arrays. Arrays are stored in memory and we use them to store integers, floating numbers, strings and we reach each of it’s member by using their indexes. In the …

  7. Array of Objects in C++ with Examples - GeeksforGeeks

    Jul 1, 2024 · To use the data and access functions defined in the class, you need to create objects. Syntax: The Array of Objects stores objects. An array of a class type is also known as …

  8. C++ program to create an array of pointers. Invoke functions …

    Write a C++ program to create an array of pointers. Invoke functions using array objects. Procedure. Step 1 - Include the required header files (iostream.h and conio.h). Step 2 - Create …

  9. C++ Example: An Array of Pointers to Class - FunctionX

    This program is an example of using an array of pointers to a class. After declaring the array, you can allocate memory for each element using the new operator. To access a member variable …

  10. Need help creating an array of pointers in a class

    Apr 8, 2020 · I am supposed to make a class Roster.cpp with an array of pointers, classRosterArray, to hold data from a given table. I am supposed to add functions into the …