Using an Array to Store a List of Pointers to Your Objects - C++ Data Type

C++ examples for Data Type:Array

Description

Using an Array to Store a List of Pointers to Your Objects

Demo Code

#include <iostream> 

using namespace std; 

class Movie { //from  w  w  w  . j  ava2s  . c  o  m
public: 
    string name; 
    int length; 
    int year; 
}; 

int main() 
{ 
    Movie *missing[10]; 

    for (int i=0; i<10; i++) 
    { 
        missing[i] = 0; 
    } 

    return 0; 
}

Related Tutorials