Distance between two coordinates

Or can I just copy The C or C++ code , then include it to a arduino?
If yes, how could I do that?

Thanks.