I create vector<TGraph*> graph
and vector<TH1D*> his
:
static vector<TGraph*> graph;
static vector<TH1D*> his;
graph[0] = new TGraph();
graph[1] = new TGraph();
graph[2] = new TGraph();
graph[3] = new TGraph();
graph[4] = new TGraph();
graph[5] = new TGraph();
his[0] = new TH1D("His0", "Result", 200, -10, 10);
his[1] = new TH1D("His1", "Result", 200, -10, 10);
his[2] = new TH1D("His2", "Result", 200, -10, 10);
his[3] = new TH1D("His3", "Result", 200, -10, 10);
his[4] = new TH1D("His4", "Result", 200, -10, 10);
his[5] = new TH1D("His5", "Result", 200, -10, 10);
and gey errors:
/home/slava/Program_Files/Root/macros/QuestOne.C:5:1: error: C++ requires a type specifier for all declarations
graph[0] = new TGraph();
^
/home/slava/Program_Files/Root/macros/QuestOne.C:6:1: error: C++ requires a type specifier for all declarations
graph[1] = new TGraph();
^
/home/slava/Program_Files/Root/macros/QuestOne.C:7:1: error: C++ requires a type specifier for all declarations
graph[2] = new TGraph();
^
/home/slava/Program_Files/Root/macros/QuestOne.C:8:1: error: C++ requires a type specifier for all declarations
graph[3] = new TGraph();
^
/home/slava/Program_Files/Root/macros/QuestOne.C:9:1: error: C++ requires a type specifier for all declarations
graph[4] = new TGraph();
^
/home/slava/Program_Files/Root/macros/QuestOne.C:10:1: error: C++ requires a type specifier for all declarations
graph[5] = new TGraph();
^
/home/slava/Program_Files/Root/macros/QuestOne.C:12:1: error: C++ requires a type specifier for all declarations
his[0] = new TH1D("His0", "Result", 200, -10, 10);
^
/home/slava/Program_Files/Root/macros/QuestOne.C:13:1: error: C++ requires a type specifier for all declarations
his[1] = new TH1D("His1", "Result", 200, -10, 10);
^
/home/slava/Program_Files/Root/macros/QuestOne.C:14:1: error: C++ requires a type specifier for all declarations
his[2] = new TH1D("His2", "Result", 200, -10, 10);
^
/home/slava/Program_Files/Root/macros/QuestOne.C:15:1: error: C++ requires a type specifier for all declarations
his[3] = new TH1D("His3", "Result", 200, -10, 10);
^
/home/slava/Program_Files/Root/macros/QuestOne.C:16:1: error: C++ requires a type specifier for all declarations
his[4] = new TH1D("His4", "Result", 200, -10, 10);
^
/home/slava/Program_Files/Root/macros/QuestOne.C:17:1: error: C++ requires a type specifier for all declarations
his[5] = new TH1D("His5", "Result", 200, -10, 10);
^
Why do I get this?! I don’t understand!
Please read tips for efficient and successful posting and posting code
ROOT Version: Not Provided
Platform: Not Provided
Compiler: Not Provided