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

  • Home
  • SEARCH
  • 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 6766907
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 26, 20262026-05-26T14:53:15+00:00 2026-05-26T14:53:15+00:00

I have a function with the following signature: float* Interpolate(float t, UINT iOrder, UINT

  • 0

I have a function with the following signature:

float* Interpolate(float t, UINT iOrder, UINT iDimension, float** ppPointsArray);

When trying to call it as follows:

float ppfValues[2][1];
ppfValues[0][0] = 0.0f;
ppfValues[1][0] = 10.0f;

float* pfResult = MyMathFuncs::Interpolate(0.5f,2,1,ppfValues);

I get the following error:

Error: argument of type float(*)[1] is incompatible with parameter of type "float**"

If I want to call it properly, I should do it like this:

float** ppfValues = new float*[2];
ppfValues[0] = new float(0.0f);
ppfValues[1] = new float(10.0f);

float* pfResult = MyMathFuncs::Interpolate(0.5f,2,1,ppfValues);

Now the question is: I thought float[x][y] was actually the same as a float**
Why are they not? What are the technical reasons? And what are they exactly, then?

  • 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-26T14:53:16+00:00Added an answer on May 26, 2026 at 2:53 pm

    I thought float[x][y] was actually the same as a float**

    It all boils down to the fact that arrays and pointers aren’t equivalent. Below is a list of C FAQs (even if this is a C++ question) which stress this fact in various ways.

    • My compiler complained when I passed a two-dimensional array to a
      function expecting a pointer to a pointer.
    • But I heard that char a[] was identical to char *a
    • So what is meant by the “equivalence of pointers and arrays” in C?
    • How do I write functions which accept two-dimensional arrays when the width is not known at compile time?
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have been trying to call a C function that has the following signature
I have a function in C++ with the following signature: float Foo(float time, float
I have a C function with the following signature: int my_function(int n, struct player
I'm getting a strange error. I have a function of the following signature: template
Assume I have a method/function with the following signature: foo($bar = 0) Inside foo
I have a unmanaged C++ function with the following signature: int function(char* param, int
I have a C function with the following method signature. NSString* md5( NSString *str
I'm trying to use a function that has the following signature to sign a
Suppose I must call a function with the following signature: doStuff(Int32?) I want to
I have a function with following signature char requestApiCall(int num, const wchar_t* pParams =

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.