I have met problems

Hi everyone,
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.
.L D:\root\src\TCavity.cxx; TCavity *my_objptr=new TCavity(); my_objptr->LoadField2(1,0,91288,1,"b.txt"); my_objptr->PlotField(1,"a*");
But now I use the same way to establish the instance of Class TCavPeriod. It failed.
The commands I used as follows:
.L D:\root\src\TCavity.cxx; .L D:\root\src\TCavPeriod.cxx; 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.