Compiler Error C3861

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
 
S

Sharad Kala

[snip]
int storeDataInDataSet(double data,vector<unsigned long>
positionVector)

This is a member function --
int GeneralDoubleTable::storeDataInDataSet(double data,vector<unsigned long>
positionVector)


Sharad
 
L

Lionel B

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:

[...]

int storeDataInDataSet(double data,vector<unsigned long>
positionVector)

should be:

int GeneralDoubleTable::storeDataInDataSet(double data,vector<unsigned long>
positionVector)

(it's a member function).
 
U

ulrich

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!!!!!!!!!!!

[...]

you forgot "GeneralDoubleTable::" before "storeDataInDataSet(double data,
....", which imho should be a method of the class GeneralDoubleTable.
 
H

Howard

In addition to the info you've already been given, you should know that your
subject line tells most of us nothing. Error numbers are specific to the
compiler you're using, and in general are meaningless to others. Next time,
you might use a subject like "identifier not found error". At least we'll
know better what you're talking about then.

Thanks,
Howard
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads

TF-IDF 1
Crossword 2
Compiler error with friend 11
Filter sober in c++ don't pass test 0
Struct Member Variables Problem 0
vector 4
Compiler Error C2676 12
typedeffing a partial specialization? 1

Members online

Forum statistics

Threads
473,744
Messages
2,569,483
Members
44,902
Latest member
Elena68X5

Latest Threads

Top