-2

Im trying to use tgamma function in c++ 10.It's running on a 32-bit machine. I've included , but still getting the error "identifier tgamma is undefined ". what could be the reason?

Jonathan Wakely
  • 160,213
  • 23
  • 318
  • 501
NavidAmin
  • 3
  • 3

2 Answers2

1

The reason why you cannot use tgamma is because your compiler doesn't support the standard in which it was introduced. You'll need to use a compiler / standard library that does support c++11 or use another implementation of tgamma as advised in an answer to in a similar question What to do if tgamma() function is not defined? which Resource kindly linked for you.

Community
  • 1
  • 1
eerorika
  • 223,800
  • 12
  • 181
  • 301
-2

math.h is C. Try this instead:

#include <cmath>
Resource
  • 494
  • 3
  • 16