Variable problem

{
TFile f2(“ht.root”, “recreate”);
TTree *mytree = new TTree(“mytree”, “Test Tree”);
Double_t val[5] = {0, 0, 0, 0, 0};
TBranch b2 = mytree->Branch(“b2”, val, “a/D:b:c:d:e”);
for (int i=0; i<8; i++) {
val[0] = 1; val[3] = -3.14; val[2] = i
1.;
mytree->Fill() ;
}
f2.Write() ;
mytree->Print();
mytree->Scan();
}

please if val[0]=1 and val[0]=4 how can i putting both in one branch a that when i open branch a i will saw 1 and 4 please help me

duplicate of Variable problem