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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 25, 20262026-05-25T10:59:38+00:00 2026-05-25T10:59:38+00:00

Hello I’ve been trying to resolve the issue that I’ve been having with the

  • 0

Hello I’ve been trying to resolve the issue that I’ve been having with the code I am working on at the moment. I have looked at other posts but couldn’t find anything relevant.
Basically, i have added all the necessary files: header and source files but still getting errors. One of many is “'setValue': identifier not found“. For some reason, it doesn’t recognize any of the functions from my header file.
Anyways, here is the portion of the code that pertains to the error. I can’t show all the code as its huge:

Header DoubleVector.h:

 #pragma once
    #pragma warning(disable : 4251)

    #ifndef DOUBLEVECTOR_H_
    #define DOUBLEVECTOR_H_

    #define _USE_MATH_DEFINES   // need to use M_PI
    #include <math.h>
    #include "PMath.h"

// whole bunch of constructors and functions declarations, which I won't show

// this is one of the functions that's causing trouble
    void    SetValue(long index,double val);

Source DoubleVector.cxx:

void CDoubleVector::SetValue(long index,double val)
{
    if(index < 0 || index >= m_nSize)
    {
        //string message("Index out of range of vector.");
        //throw PMathError(message);
        throw PMathError("Error: index(%d) out of range. <- void SetValue(long index, double val) in DoubleVector.cxx",index); // tested
    }

    m_pData[index] = val;
}

File where I am calling my functions variogram.cc:

#include "variogram.h"
#include "DoubleVector.h"


    void Variogram::estimate() {

        base_multimin_function_fdf fdf;

        fdf.n = _spatialCorrFunc.param.size(); 

        fdf.f = &minimizationf;
        fdf.df = &minimizationfd;
        fdf.fdf = &minimizationfdf;
        fdf.params = this;
        long iter = 0;
        int status;
        //gsl_vector *x = gsl_vector_alloc(fdf.n); 

        for (int i = 0; i < fdf.n; ++i) {
            if(i < 3)


     //gsl_vector_set(x, i, sqrt(_spatialCorrFunc.param[i]));
         //Greg: void SetValue(long index, double val) as an alternative //to gsl_vector_set(...)
            SetValue(i,sqrt(_spatialCorrFunc.param[i]));
            else//kappa
             SetValue(i, _spatialCorrFunc.param[i]);
        }

This thing is driving me crazy but I am sure it’s something stupid that I’m not seeing.
Thanks in advance.

  • 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-25T10:59:39+00:00Added an answer on May 25, 2026 at 10:59 am

    You’re using a member function without having an instance. You need to create an object and then call it on that object:

    CDoubleVector dv;
    ...
    dv.SetValue(i, sqrt(_spatialCorrFunc.param[i])); // etc
    

    You can only use the plain SetValue(something) when you’re inside a member function in the class that has the member SetValue, in which case it’s shorthand for this->SetValue(something). That way the compiler knows what object you’re talking about.

    Not to mention your capitalisation is was wrong.

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

Sidebar

Related Questions

Hello guys I am working on silverlight and I have issue regarding on database
Hello I am working with a simulator that uses rcS scripts to boot, this
Hello i been trying to get a tokenizer to work using the boost library
Hello, Im working on a solution for Android that will record calls (both out
Hello I am trying to create a stacked barplot using the following code: test
Hello I am trying to do a SOAP request here is my code: #
hello i have a desktop application that communicate with a wcf service that i
Hello I have this problem with PyQt4-dev-tools that include: * a user interface compiler
Hello i have this code var queue = new BlockingCollection<int>(); queue.Add(0); var producers =
Hello I have the following error by git-fsck, which cannot be cleaned by git-gc

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.