class R
{
public:
R ( int r1, int r2) : R1(r1),R2(r2){}
private:
int R1, R2;
};
private:
int R1, R2;
};
void main()
{
e.g 1
vector< R*> r;
for(int i=0; i<5; i++)
r.push_back( new R(i,i+1));
{
e.g 1
vector< R*> r;
for(int i=0; i<5; i++)
r.push_back( new R(i,i+1));
e.g 2
R *r[5];
for ( int i=0; i<5; i++)
r[i] = new R(i,i+1);
e.g 3
R r[] = {R(1,2), R(2,3), R(3,4)};
}