Std::vector of TLine or TPaveText

Dear experts,

I am trying to iterate when I define a TLine and TPaveText that I need to include in a plot, so I thought of using a std::vector in such a way:

std::vector < TLine > mylin;

I get as error:
In module ‘std’ imported from input_line_1:1:
/cvmfs/…/lib/gcc/x86_64-pc-linux-gnu/11.2.0/…/…/…/…/include/c++/11.2.0/bits/stl_vector.h:680:30: error: no member named ‘_M_start’ in ‘std::_Vector_base<TLine, std::allocator >::_Vector_impl’
std::_Destroy(this->_M_impl._M_start, this->_M_impl._M_finish,
~~~~~~~~~~~~~ ^
input_line_150:2:21: note: in instantiation of member function ‘std::vector<TLine, std::allocator >::~vector’ requested here
std::vector mylin;

Do you suggest a more appropriate way of doing this? This is the way I usually use to iterate definitions of Histograms, TGraphs … etc

I am working with root c++ on Swan

Thanks & regards,


Did you try



1 Like

I didn’t try and that was the solution! Dumb error from my part, thanks!


This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.