Using std::map with a user defined class - pragma question


I am using root 5.14/00 on Windows XP.

I have a class A (see attachment) which I would like to use in a vector and a map. Using it in a vector poses no problems. I did not need to do anything special (see attachment test.C).

When using the map I have to do .L loader1.C+ before I can run test.C. However, when I do that I get a warning “No dictionary for class A is avaliable”.

What is the consequence of not having a dictionary for A? Also if I want to create a dictionary for A I tried adding the line

to my loader1.C macro but this did not work. What line should I add?

test.C (604 Bytes)
loader1.C (163 Bytes)
A.C (301 Bytes)

[quote]What is the consequence of not having a dictionary for A? [/quote]You will not be able to use the I/O for A object. You will not be able to access the compiled version of A from a script.

Since you also include A.C in your interpreted script (aka test.C), the version of A you are using is actually the interpreted version. This is ‘okay’ if and only if you never ever pass the address of a A object to a compile function (that does more than just storing the value).

[quote]What line should I add? [/quote]The line you added works for me. How is it failing for you?