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 7755245
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 1, 20262026-06-01T12:31:13+00:00 2026-06-01T12:31:13+00:00

until there I trusted that method like bool solverMethod::buildSimplex(double** simplex_ , double* funcEvals_, double*

  • 0

until there I trusted that method like

bool solverMethod::buildSimplex(double** simplex_ , double* funcEvals_, double* initPt_)
{
  // things
}

would change values for simplex, funcEvals_, initPt_ in the method where it is called (passage by pointer). Am I wrong? How to put it then?

thanks and regards and apologizes for simple question.

  • 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-06-01T12:31:14+00:00Added an answer on June 1, 2026 at 12:31 pm

    This is maybe not as much an answer as it is a general explanation of pointers, references and reference semantics.

    A function is said to have reference semantics if it can change the argument objects that are passed to it. For example, the following swap function has reference semantics if it exchanges the values:

    int x = 4;
    int y = 8;
    
    swap(x, y);
    
    assert(x == 8 && y == 4);
    

    The question is how you implement reference semantics. C++ has a native reference type that makes this very natural:

    void swap(int & a, int & b) { int t = a; a = b; b = t; }
    

    By contrast, C does not have such a native feature, and every object in C is passed by value. However, C has a different feature that can be used to implement reference semantics, namely pointers: For every type T, there is a related type T*, a value of which can be obtained by taking the address-of an object of type T: int x; int * p = &x;. Now you can pass those pointer objects around by value and use them to access the original object to which they point. Notice that we are passing the pointers by value!

    void c_swap(int * p, int * q) { int t = *p; *p = *q; *q = t; }
    

    We have to call the function differently: swap(&x, &y). Thus in C you can always tell whether an argument is being modified, because the only way to do this is by passing its address to a function. In C++, you have to know the actual function signature to know whether reference or value semantics are in place.

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

Sidebar

Related Questions

I have a short C program that writes into a file until there is
I'm building a Django project that needs search functionality, and until there's a django.contrib.search
I want to write a script that fills a directory with music until there's
I'm using Server.HtmlEncode on a utf-8 string in asp-classic, which works fine until there
From the .net 4.0 previews I have read until now there has been lots
Is there a do until x: ... in Python, or a nice way to
Is there any way to make the program sleep until an event occurs, but
There is a console Java application which is supposed to run until it is
I assumed there were only bug fixes/(no new types) in .NET 2.0 SP1 until
I need a shell script that deletes 1000 rows from a massive database until

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.