Hi whats the header file for the function max(int, int) for C. I thought it was cmath.h or math.h but none of them are being shown in linux
Hi whats the header file for the function max(int, int) for C. I thought it was cmath.h or math.h but none of them are being shown in linux
The max function is defined in <algorithm> for C++, but I don't believe such a (portable) function exists for C. Of course you could always make your own:
Code:int my_max(int a, int b) { return (a > b) ? a : b; }
bit∙hub [bit-huhb] n. A source and destination for information.
You've got fmax and fmin, of course, in math.h. Granted those expect floating point.