Advertisement
If you have a new account but are having problems posting or verifying your account, please email us on hello@boards.ie for help. Thanks :)
Hello all! Please ensure that you are posting a new thread or question in the appropriate forum. The Feedback forum is overwhelmed with questions that are having to be moved elsewhere. If you need help to verify your account contact hello@boards.ie
Hi there,
There is an issue with role permissions that is being worked on at the moment.
If you are having trouble with access or permissions on regional forums please post here to get access: https://www.boards.ie/discussion/2058365403/you-do-not-have-permission-for-that#latest

Quick C++ Question

  • 15-12-2005 11:11am
    #1
    Registered Users, Registered Users 2 Posts: 871 ✭✭✭


    Very simple question: I'm trying to use the pow method from cmath, but I getting an error:

    error C2873: 'pow' : symbol cannot be used in a using-declaration

    I'm sure it's something very simple that I've over looked. I've inported cmath, do I have to use something something like:

    using pow;

    or

    using cmath.pow;

    Thanks
    Ger...


Comments

  • Registered Users, Registered Users 2 Posts: 2,082 ✭✭✭Tobias Greeshman


    using ::pow ;
    


  • Registered Users, Registered Users 2 Posts: 871 ✭✭✭gerTheGreat


    Nope, that's still giving the same error.:(


  • Registered Users, Registered Users 2 Posts: 2,082 ✭✭✭Tobias Greeshman


    Worked for me anyways the using shouldn't really be necessary, try just using the pow function as normal, without any resolution operators... eg:
    double x = pow ( 2, 3 ) ;
    

    When you include the cmath include, it normally just includes the old c math.h header file.


Advertisement