This function takes the value of re (double) and the program should resolve the equations and return the value of f. The problem is that I do not know if c ++ simply does not solve such equations, or if there is any command, for this. I included a math.h library.
Yes you can certainly solve this type of equation in C++ (or any other decent computing lanuguage). They look like typical equations for the friction factor f in turbulent flow through pipes. If that is so then I would expect the right-hand side of the second one to be squared, not square-rooted: check your source.
However, C++ will not just do it automatically for you. These are iterative equations (solution variable f appears on both sides of the equations).
Thus you will need:
(i) to initialise f before attempting to solve. (f = 1 would do; f=0 would fail in the log() or division by sqrt()).
(ii) to loop each equation; (while or do-while)
(iii) to have a convergence criterion (checking that the change is less than some small tolerance is fine).