I’m a student of the Institute of High Energy Physics in China. I now use root to
do some data analysis. But I have met some problems. Here are the details. I have written two
classes TCavity and TCavPeriod. TCavPeriod is an inheritance of Class TCavity.
I have tested the TCavity Class and it worked well. The commands I used as follows.
TCavity *my_objptr=new TCavity();
But now I use the same way to establish the instance of Class TCavPeriod. It failed.
The commands I used as follows:
TCavPeriod *my_objptr1=new TCavPeriod();
The root crashed this time. I don’t know why.
The TCavPeriod class has its own constructor. My C++ is Microsoft Visual Studio 2010 version.
Thanks for your answer.
It looks like your image did not attach properly. In order to get people to help you should include some example code showing what you are doing.
Sorry for my mistake. I have checked it and modified this post. Thanks for reminding me.
He means that you need to attach “TCavity.cxx” and “TCavPeriod.cxx” (plus “b.txt” so that one can try to run them) or any minimal source code that demonstrates your problem.