Open a txt and copy dates from root?

Hi,

my professor has written a program(LetturaFile.C) in order to create a histogram. This program read dates from a txt file (lente_biconvessa.txt) and, in order to run the program, he said to use " root -l ‘letturaFile.C++(“lente_biconvessa.txt”,40,200,300)’ " but root gives me this error:

macro 'letturaFile.C not found

and when I delete the " ’ " root gives me these errors:

Error: Symbol lente_biconvessa is not defined in current scope (0)
Error: Failed to evaluate lente_biconvessa.txt

Can you help me ?

Thanks ! :smiley:

letturaFile.C (2.0 KB)

lente_biconvessa.txt (715 Bytes)

Hi Alberto,

You should run it like this: root -l 'letturaFile.C+("lente_biconvessa.txt")'

Hi, same mistake :

Warning in TApplication::GetOptions: macro 'letturaFile.C not found

Check that letturaFile.C is in the directory where you run the command.

Thanks for the answers. Yes, it is in the right place

From the error message, it seems like you are using two single quotes instead of a double quote somewhere.
Please try to copy and paste the command as I wrote it above. It works for me.

Thank you, but:

I have Windows 10, what do you have?

Hi,

This way should work (it does for me):
root -l "letturaFile.C+(\"lente_biconvessa.txt\")"

Cheers, Bertrand.

It works, thank you bellenot ! :smiley:

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