How to get square root in Carbide C++?

hi everyone,

I meet a strange problem, I want to get the square root vale of a number. Here are two functions I found

1. #import <e32math.h>

Sqrt(TReal &,const TReal &)

2. #import <MATH.h>

IMPORT_C double sqrt(double);

I found these functions in SDK of N97, however, I have no idea of how to use them.

Can anyone give me some examples of the usage of these functions? How to fill in the parameter part of these two functions?

Thanks a lot

Re: How to get square root in Carbide C++?

You can always check the documentation.[QUOTE]TReal nine=9;

TReal three;

TInt err=Math::Sqrt(three,nine);[/QUOTE]so it returns an error code, that is why it has two arguments.

Re: How to get square root in Carbide C++?

[QUOTE=wizard_hu_;736338]You can always check the documentation.so it returns an error code, that is why it has two arguments.[/QUOTE]

Thanks for you attention,I solved this problem.

I add the constructer to the head file, then I use

Math::sqrt(destination,source)

Then it works