Mine
public text v1 · immutable// \m/etal array
#include <iostream>
using namespace std;
class Foo
{
private:
int value;
public:
Foo(int);
int GetValue();
};
Foo::Foo(int value)
{
this->value = value;
}
int Foo::GetValue()
{
return this->value;
}
int main (int argc, char** argv)
{
Foo** foos = new Foo* [10];
foos[0] = new Foo(0);
foos[1] = new Foo(1);
foos[2] = new Foo(2);
foos[3] = new Foo(3);
for(Foo** foo = foos; *foo != NULL; foo++)
{
cout << (*foo)->GetValue() << endl;
}
cin.get();
return 0;
}