×

Discussion Board

Results 1 to 3 of 3
  1. #1
    Regular Contributor
    Join Date
    Mar 2010
    Posts
    64

    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

  2. #2
    Nokia Developer Moderator
    Join Date
    Feb 2006
    Location
    Oslo, Norway
    Posts
    28,674

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

    You can always check the documentation.
    TReal nine=9;
    TReal three;
    TInt err=Math::Sqrt(three,nine);
    so it returns an error code, that is why it has two arguments.

  3. #3
    Regular Contributor
    Join Date
    Mar 2010
    Posts
    64

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

    Quote Originally Posted by wizard_hu_ View Post
    You can always check the documentation.so it returns an error code, that is why it has two arguments.

    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

Similar Threads

  1. Carbide useability issues
    By lightspiritproductions in forum Carbide.c++ IDE and plug-ins (Closed)
    Replies: 3
    Last Post: 2010-01-19, 04:26
  2. armv5 does not work in Carbide
    By symbiansamuli in forum Carbide.c++ IDE and plug-ins (Closed)
    Replies: 2
    Last Post: 2009-06-08, 17:38
  3. Square root function parameter confusion
    By dunff2k in forum Symbian
    Replies: 4
    Last Post: 2009-02-06, 19:25
  4. Carbide versus Carbide Visual Studio
    By VirGin in forum Symbian Tools & SDKs
    Replies: 6
    Last Post: 2008-07-10, 02:56
  5. Help with Math, Square Root
    By howl in forum Symbian
    Replies: 3
    Last Post: 2008-02-13, 11:41

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
×