I am exploring the work on cstring
inside a C++ code. One of the functions that is commonly used is strrev()
.
But I found that this function is considered undefined on Mac & Linux, even if I included the header file <cstring>
or <string.h>
.
However, the function works fine on Windows.
(I am aware that I can define the function myself as the solution presented in here strrev not available on Linux)
This might be a very naive question, but aren't the definitions of header files supposed to be the same across different platforms? or does each platform have a different definition of the header file?
Another weird thing that is I did not find strrev()
in the description of the <cstring>
header file (cstring header file description), but if I don't include this header file on Windows I get an error and the error is resolved when I include it.