Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > C++ > Compiler Error C3861

Reply
Thread Tools

Compiler Error C3861

 
 
johankildal@gmail.com
Guest
Posts: n/a
 
      05-09-2005
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<unsi gned 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

 
Reply With Quote
 
 
 
 
Sharad Kala
Guest
Posts: n/a
 
      05-09-2005

<(E-Mail Removed)> wrote in message

[snip]

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

positionVector)

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


Sharad


 
Reply With Quote
 
 
 
 
johankildal@gmail.com
Guest
Posts: n/a
 
      05-09-2005
Embarrasingly simple, but I was being blind. Many thanks, Sharad

 
Reply With Quote
 
Lionel B
Guest
Posts: n/a
 
      05-09-2005
<(E-Mail Removed)> wrote in message news:(E-Mail Removed) ups.com...
> 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).

--
Lionel B

 
Reply With Quote
 
ulrich
Guest
Posts: n/a
 
      05-09-2005
On 9 May 2005 05:18:08 -0700, <(E-Mail Removed)> wrote:

> 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<unsi gned 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.
 
Reply With Quote
 
Howard
Guest
Posts: n/a
 
      05-09-2005

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


 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
error C3861: 'Py_InitModule' duprez@hinet.net.au Python 1 01-31-2009 06:10 AM
error C3861: 'FindFirstVolumeW': identifier not found rinka_s Software 0 04-29-2007 04:58 AM
Compiler Error Message: The compiler failed with error code -1073741819 Ram ASP .Net 0 09-13-2005 09:52 AM
Can we use <compiler> tag to avoid RunTime Compiler error? Jack Wright ASP .Net 5 01-19-2004 04:36 PM
Compiler Error Message: The compiler failed with error code 128. Yan ASP .Net 0 07-21-2003 10:49 PM



Advertisments