J
johankildal
I am probably being very naïve, but I can't explain why I am getting
this compiler erro. Here is an outline of the code with the problem:
//***DECLARATION IN GeneralDoubleTable.h***//
#pragma once
#include <iostream>
#include <vector>
using namespace std;
class GeneralDoubleTable
{
protected:
vector<unsigned long> dimsVector;
void setDimsVector (vector<unsigned long> dimsVector)
{ this->dimsVector = dimsVector; };
public:
int storeDataInDataSet(double,vector<unsigned long>);
int getTotDims()
{ return dimsVector.size(); };
vector<unsigned long> getDimsVector()
{ return dimsVector; };
...
};
//***DEFINITION in GeneralDoubleTable.cpp***
#include "GeneralDoubleTable.h"
using namespace std;
GeneralDoubleTable::GeneralDoubleTable(vector<unsigned long>
dimsVector)
{
...
setDimsVector(dimsVector);
...
}
int storeDataInDataSet(double data,vector<unsigned long>
positionVector)
{
if( positionVector.size() != getTotDims()) return 1; //Here I get the
ERROR!!!!!!!!!!!
...
return 0;
}
}
=====================
c:\Project\GeneralDoubleTable.cpp(44) : error C3861: 'getTotDims':
identifier not found, even with argument-dependent lookup
This is the error I get, pointing to where I have indicated. Why can it
not find that function??? Thanks
this compiler erro. Here is an outline of the code with the problem:
//***DECLARATION IN GeneralDoubleTable.h***//
#pragma once
#include <iostream>
#include <vector>
using namespace std;
class GeneralDoubleTable
{
protected:
vector<unsigned long> dimsVector;
void setDimsVector (vector<unsigned long> dimsVector)
{ this->dimsVector = dimsVector; };
public:
int storeDataInDataSet(double,vector<unsigned long>);
int getTotDims()
{ return dimsVector.size(); };
vector<unsigned long> getDimsVector()
{ return dimsVector; };
...
};
//***DEFINITION in GeneralDoubleTable.cpp***
#include "GeneralDoubleTable.h"
using namespace std;
GeneralDoubleTable::GeneralDoubleTable(vector<unsigned long>
dimsVector)
{
...
setDimsVector(dimsVector);
...
}
int storeDataInDataSet(double data,vector<unsigned long>
positionVector)
{
if( positionVector.size() != getTotDims()) return 1; //Here I get the
ERROR!!!!!!!!!!!
...
return 0;
}
}
=====================
c:\Project\GeneralDoubleTable.cpp(44) : error C3861: 'getTotDims':
identifier not found, even with argument-dependent lookup
This is the error I get, pointing to where I have indicated. Why can it
not find that function??? Thanks