[quote]Error in : Dictionary generation failed with a core dump!
Info in : Invoking compiler to check macro’s validity
Info in : The compiler has not found any problem with your macro.
Probably your macro uses something rootcint can’t parse.
Check root.cern.ch/viewvc/trunk/cint/doc/limitati.txt for Cint’s limitations.
[/quote]
Am I right that I could not pass an array to a class, and use it out of the class? If so, what is the better way I could do such things under the limitation?
[quote=“yjc”]
Am I right that I could not pass an array to a class, and use it out of the class? If so, what is the better way I could do such things under the limitation?
Thanks.
yjc[/quote]
If I understand correctly, your class is not the owner - these arrays are somehow declared somewhere else and they live longer than object of your class?
Well, if CINT has such limitations … why not using a trivial pointer to double instead? Sure, info about object size will be lost … Well, you can use std::vector in this case. While it’s quite ugly, you can even use vectors of vectors if you do not want to do arithmetics yourself (converting 2d/3d indices into the 1d index - in case you “emulate” 2d/3d arrays with one array like p[i * rowSize + j]).
[quote=“tpochep”][quote=“yjc”]
Am I right that I could not pass an array to a class, and use it out of the class? If so, what is the better way I could do such things under the limitation?
Thanks.
yjc[/quote]
Do you really need a classdef/classimp? I do not think you want to serialize your class.
If I understand correctly, your class is not the owner - these arrays are somehow declared somewhere else and they live longer than object of your class?
Well, if CINT has such limitations … why not using a trivial pointer to double instead? Sure, info about object size will be lost … Well, you can use std::vector in this case. While it’s quite ugly, you can even use vectors of vectors if you do not want to do arithmetics yourself (converting 2d/3d indices into the 1d index - in case you “emulate” 2d/3d arrays with one array like p[i * rowSize + j]).[/quote]
thank you for your help.
1)You are right. I do not need a classdef. Right now , I just want to use it. That is all.
2)The way I wrote codes is just as you guess. I will think about your suggestion. For now, I have changed the whole structure of the code, and “keep” these arrays only inside of this class.