Rray of strings gives uncompilable code in cint dictionary

Hello,
I (ROOT 5.11/06) have

private:
string s[7];

in my class. When generating the dictionary for the class, rootcint produces code containing the line
TString R__str = s.c_str();
which is not compilable (s being an array of strings, not a string). I am wondering if I am asking too much of ROOT here. Since I am reusing a lot of code containing standard strings, I am very reluctant (if not incapable) to switch to TStrings everywhere…
(More details in the attached files that reproduce the problem).

Many thanks in advance,

Thomas
myClass.C (1.2 KB)

Hi Thomas,
this case was not implemented - thanks for reporting. The fix is in CVS; it will be included in the upcoming release.

Nevertheless, you should use #pragma link C++ class myClass+; in your linkdef file (note the “+” at the end), and specify the linkdef file as the last argument to rootcint.

Cheers, Axel.