-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
  • 166,810
  • 27
  • 341
  • 521
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
  • 232,697
  • 12
  • 197
  • 326
-2

math.h is C. Try this instead:

#include <cmath>
Resource
  • 524
  • 4
  • 16