Can't draw a user function

I tried to do draw my function but it was error.

	Double_t myFunc(Double_t x) {
 	return x*x+x+1.0 ; 

	TF1 *f = new TF1("f", "myFunc(x)", 0, 100);

This is a error.

Who can help me resolve this problem?

ROOT Version: 5.34/36
Platform: Windows 10
Compiler: Not Provided


hammiu.C (134 Bytes)

1 Like

Thank you, everything is good. I didn’t have “void”.

I have a question. On which IDE do you write code? i write it on Notepad++, but it is not good because some codes are different from C++, for exmaple declare integer parameter Int_t (in C++ int32_t).

I see you are working on Windows 10. I am working on MacOS, so I do know what is the best IDE on Windows. May be @bellenot can give you some advices on that topic.

1 Like

I use VS Code as code editor, otherwise I use Visual Studio, mostly for debugging

1 Like

Could you tell me what I have to do to appear hints for command line typing in VS Code and debugging on it ? I spend a lot of time because I type code in NOTEPAD. Sometimes my file has some mistakes, only i execute file, i recognized that mistakes.