I'm working on a C++
project and now porting some functions to C
. The project works well when I'm using the cpp
files, however, when I include the C
files in the project, the compiler is unable to find certain headers like <limits>
, <algorithm>
etc.
Could someone help me with this?
The C versions of <limits>
are called <limits.h>
and <float.h>
respectively. They are not code compatible with the funcions in C++ <limits>
but serve the same purposes.
<algorithm>
is a pure C++ library header and cannot be used in C programs. If your code relies on features from <algorithm>
, they will have to be rewritten from scratch.