I\'m working on a C++ program for class, and my compiler is complaining about an \"ambiguous\" function call. I suspect that this is because there are several functions defined
Try using fabs defined in . It takes float, double and long double as arguments. abs is defined both in and . The difference is abs(int), abs(long) and abs(long long) are defined in while other versions are defined in .