// 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 <vector>
#include <string>

using namespace std;

int main()
{
    int iv = 123;
    double xv = 123.456;
    string sv = "ABC";
    vector<void *> v;
    v.push_back(&iv);
    v.push_back(&xv);
    v.push_back(&sv);
    cout << *((int*)v[0]) << endl;
    cout << *((double*)v[1]) << endl;
    cout << *((string*)v[2]) << endl;
    return 0;
}
