Notes
![]() ![]() Notes - notes.io |
{
TFile* hfile = TFile::Open("money_array.root","RECREATE");
TTree* t = new TTree("savings","Bank Accounts");
/* suppose there are two brothers, Ali and Cem Ali has 2 bank accounts Cem has 3 bank account3 */
//Initilisation: let's declare 2 arrays with 2 elements for Ali 3 elements for Cem
Int_t Ali_account[2]={0};//initilisation, {0} means all elements are zero
Int_t Cem_account[3]={0};
/*let's create a branch, and a leaf to store the array
branch "Fizbank", link to array Ali_account, with one leaf "bank" .*/
//Events->Tree Name, Event Tree->Tree Tıtle
Int_t money1, money2, money3;
t->Branch("Fizbank",Ali_account, "bankAli[2]/I");//there is no address operator("&"(ampersand))
infront of the array name, because array takes the first address according to c++ language
t->Branch("Matbank",Cem_account, "bankCem[3]/I");
Ali_account[0]=25; Ali_account[1]=90;
Cem_account[0]=10;Cem_account[1]=20; Cem_account[2]=30;
t->Fill();
Ali_account[0]=5; Ali_account[1]=10;
Cem_account[0]=3; Cem_account[1]=30; Cem_account[2]=300;
t->Write();
hfile->Close();
}
![]() |
Notes is a web-based application for online taking notes. You can take your notes and share with others people. If you like taking long notes, notes.io is designed for you. To date, over 8,000,000,000+ notes created and continuing...
With notes.io;
- * You can take a note from anywhere and any device with internet connection.
- * You can share the notes in social platforms (YouTube, Facebook, Twitter, instagram etc.).
- * You can quickly share your contents without website, blog and e-mail.
- * You don't need to create any Account to share a note. As you wish you can use quick, easy and best shortened notes with sms, websites, e-mail, or messaging services (WhatsApp, iMessage, Telegram, Signal).
- * Notes.io has fabulous infrastructure design for a short link and allows you to share the note as an easy and understandable link.
Fast: Notes.io is built for speed and performance. You can take a notes quickly and browse your archive.
Easy: Notes.io doesn’t require installation. Just write and share note!
Short: Notes.io’s url just 8 character. You’ll get shorten link of your note when you want to share. (Ex: notes.io/q )
Free: Notes.io works for 14 years and has been free since the day it was started.
You immediately create your first note and start sharing with the ones you wish. If you want to contact us, you can use the following communication channels;
Email: [email protected]
Twitter: http://twitter.com/notesio
Instagram: http://instagram.com/notes.io
Facebook: http://facebook.com/notesio
Regards;
Notes.io Team