Invalid suffix 'D' on floating constant

Hi ROOT family,

I am a new and stupid student on ROOT. I got a question of my script. I obtained a long list of many particles, but each entry contains some numbers and a character. I was trying to find out the total number of each different particles, but my script was wrong and I could not make it right. The error was: invalid suffix β€˜D’ on floating constant. I know I this D here is not a number, but I could not make my script correct.

Can anyone give me a hand?
Thanks so much for anyone who can help!
hz_05C290counts.C (509 Bytes)
cross_dmp.txt (1.2 MB)

That’s not a ROOT problem, but anyway, you can just read and compare the entries as strings (instead of as numbers). If you need to use them as numbers, you have to first know what those codes mean and then work with them accordingly, so check with whoever or whatever code generated them.

No need to make a big issue of it.
Just replace all β€œD” (from Fortran) with β€œe” (for C/C++).

1 Like

Thanks so much!

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.