// Collection of code snippets by Arne Vajhøj 
// (likely posted to comp.os.vms/INFO-VAX, INFO-TPU, MACRO32, eksperten.dk, newz.dk, LinkedIn or other place sometime between 1990 and now) 
#include <iostream>
#include <string>
#include <vector>

using namespace std;

class MyData
{
   private:
      string s;
   public:
      MyData() { s = ""; };
      MyData(string s) { this->s = s; };
      string GetS() { return s; };
      void SetS(string s) { this->s = s; };
};

int main()
{
   vector<MyData*> myvec;
   myvec.push_back(new MyData("A"));
   myvec.push_back(new MyData("BB"));
   myvec.push_back(new MyData("CCC"));
   for(int i = 0; i < myvec.size(); i++)
   {
      cout << myvec[i]->GetS() << endl;
   }
   return 0;
}
