Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7590191
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 30, 20262026-05-30T20:20:33+00:00 2026-05-30T20:20:33+00:00

With C++, I try to #define TINY std::pow(10,-10) I give the code with the

  • 0

With C++, I try to

#define TINY std::pow(10,-10)

I give the code with the #include and namespace information for the class (.h) where TINY is defined

#pragma once
#include "MMath.h"
#include <string>
#include <cmath>
#include <vector>

using namespace std;

#define TINY std::pow(10,-10)

I use TINY in some function implementation in .cpp file, and TINY gives error

IntelliSense: more than one instance of overloaded function “std::pow” matches the argument list

What is right syntax?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-30T20:20:33+00:00Added an answer on May 30, 2026 at 8:20 pm

    Edit: I do agree with the commenters saying that using std::pow() in place of a literal constant is unnecessary – so for this particular problem, go with the 1.0E-10 constant; my explanation of the actual error you were getting and the way to solve it still stands.

    This has nothing to do with your #define. std::pow() is an overloaded function, and none of its overloads take (int, int) as arguments. You should provide arguments with types which unambiguously select an overload. Depending on the type of return value you want, you’ll probably want to select one of these overloads:

          float pow (       float base,       float exponent );
         double pow (      double base,         int exponent );
    long double pow ( long double base,         int exponent );
    

    which you can invoke as follows:

    std::pow(10.0f, -10.0f)
    std::pow(10.0, -10)
    std::pow(10.0L, -10)
    

    respectively.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a class with a read-only property defined. In my code I define
Consider the following code: #include <stdlib.h> #ifndef TRY #define TRY struct #endif TRY testme
I try to define a schema for XML documents I receive. The documents look
I know how to do a global variable, but whenever I try to define
Try the following code public enum Color { Blue=1, Red=2, Green=3 } public List<Color>
Try as I might I cannot get my head around what the IteratorIterator class
I try to define the Reader monad with scalaz like this: import scalaz._ import
I am trying to craft a macro replacing newlines. My first try was: define(`m4_pascal_str',`
Basically when I try to define different padding amounts for the TRBL the rule
I try to define a constructor for C++ struct , and coincidently, this is

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.