Hi I've created a class to be used with stl vector. I'm having a hard time decipher the error message outpout by g++... - burlen@quaoar:~/hdf52vtk_dev/src$ g++ junk.cpp GridPoint.o
-
/usr/include/c++/3.3.3/bits/stl_algo.h: In function `_RandomAccessIter
-
std::find(_RandomAccessIter, _RandomAccessIter, const _Tp&,
-
std::random_access_iterator_tag) [with _RandomAccessIter =
-
__gnu_cxx::__normal_iterator<GridPoint*, std::vector<GridPoint,
-
std::allocator<GridPoint> > >, _Tp = GridPoint*]':
-
/usr/include/c++/3.3.3/bits/stl_algo.h:298: instantiated from `_InputIter std::find(_InputIter, _InputIter, const _Tp&) [with _InputIter = __gnu_cxx::__normal_iterator<GridPoint*, std::vector<GridPoint, std::allocator<GridPoint> > >, _Tp = GridPoint*]'
-
junk.cpp:47: instantiated from here
-
/usr/include/c++/3.3.3/bits/stl_algo.h:208: error: no match for 'operator==' in
-
'(&__first)->__gnu_cxx::__normal_iterator<_Iterator, _Container>::operator*
-
[with _Iterator = GridPoint*, _Container = std::vector<GridPoint,
-
std::allocator<GridPoint> >]() == __val'
-
GridPoint.h:46: error: candidates are: bool GridPoint::operator==(const
-
GridPoint&) const
-
/usr/include/c++/3.3.3/bits/stl_algo.h:211: error: no match for 'operator==' in
-
'(&__first)->__gnu_cxx::__normal_iterator<_Iterator, _Container>::operator*
-
[with _Iterator = GridPoint*, _Container = std::vector<GridPoint,
-
std::allocator<GridPoint> >]() == __val'
-
GridPoint.h:46: error: candidates are: bool GridPoint::operator==(const
-
GridPoint&) const
-
/usr/include/c++/3.3.3/bits/stl_algo.h:214: error: no match for 'operator==' in
-
'(&__first)->__gnu_cxx::__normal_iterator<_Iterator, _Container>::operator*
-
[with _Iterator = GridPoint*, _Container = std::vector<GridPoint,
-
std::allocator<GridPoint> >]() == __val'
-
GridPoint.h:46: error: candidates are: bool GridPoint::operator==(const
-
GridPoint&) const
-
/usr/include/c++/3.3.3/bits/stl_algo.h:217: error: no match for 'operator==' in
-
'(&__first)->__gnu_cxx::__normal_iterator<_Iterator, _Container>::operator*
-
[with _Iterator = GridPoint*, _Container = std::vector<GridPoint,
-
std::allocator<GridPoint> >]() == __val'
-
GridPoint.h:46: error: candidates are: bool GridPoint::operator==(const
-
GridPoint&) const
-
/usr/include/c++/3.3.3/bits/stl_algo.h:223: error: no match for 'operator==' in
-
'(&__first)->__gnu_cxx::__normal_iterator<_Iterator, _Container>::operator*
-
[with _Iterator = GridPoint*, _Container = std::vector<GridPoint,
-
std::allocator<GridPoint> >]() == __val'
-
GridPoint.h:46: error: candidates are: bool GridPoint::operator==(const
-
GridPoint&) const
-
/usr/include/c++/3.3.3/bits/stl_algo.h:226: error: no match for 'operator==' in
-
'(&__first)->__gnu_cxx::__normal_iterator<_Iterator, _Container>::operator*
-
[with _Iterator = GridPoint*, _Container = std::vector<GridPoint,
-
std::allocator<GridPoint> >]() == __val'
-
GridPoint.h:46: error: candidates are: bool GridPoint::operator==(const
-
GridPoint&) const
-
/usr/include/c++/3.3.3/bits/stl_algo.h:229: error: no match for 'operator==' in
-
'(&__first)->__gnu_cxx::__normal_iterator<_Iterator, _Container>::operator*
-
[with _Iterator = GridPoint*, _Container = std::vector<GridPoint,
-
std::allocator<GridPoint> >]() == __val'
-
GridPoint.h:46: error: candidates are: bool GridPoint::operator==(const
-
GridPoint&)
in my class I have defined it like this:
bool GridPoint::oper ator== ( const GridPoint &rhs ) const;
can you help me figure what the error messages mean?
0 6137 Sign in to post your reply or Sign up for a free account.
Similar topics |
by: Giulio |
last post by:
I'm doing a class who takes in constructor a vector<int> keeps and makes
some statistic on the vector whitout modifiing it.
I would like not to make a copy of the vector for the class. to let the full
process be faster a smaller in memory.
I tried to pass the vector by reference using * but that operator doesn't
exist.
my ask is: how the vector are passed to functions?
|
by: Nomak |
last post by:
Hello,
With this code:
$ cat -n ifs.cc
1 #include <vector>
2 #include <iostream>
3
4 using std::vector;
5 using std::cin;
|
by: tehn.yit.chin |
last post by:
I am trying to experiment <algorithm>'s find to search for an item in a
vector of struct. My bit of test code is shown below.
#include <iostream>
#include <vector>
#include <algorithm>
#include <string>
struct abc_struct
{
|
by: imutate |
last post by:
How do I implement << ala std::cout for vector template ?
I already have the following:
#include <vector>
template < typename T >
class Vec : public std::vector< T {
public:
Vec() { }
Vec( int s ) : std::vector<T>(s) { }
|
by: sandy |
last post by:
I am trying to make a simulated directory structure application for a
course.
I am using a Vector to store pointers to my Directory objects (as
subdirectories of the current object).
In my header it looks like this (private section)
vector<Directory*Directories;
| |
by: lovecreatesbea... |
last post by:
The find() in <algorithmrequires two input iterators as its first and
second arguments. In some of my code, I use vector<T>::begin() and
vector<T>::end() as the first and second arguments. The T::operator==
and T::operator!= are defined. And the code works.
The begin() and end() of vector<Tare not input iterators but random
access iterators, right? Why I use find() on vectors, are there
something wrong?
Class OgFile{
|
by: PaperPilot |
last post by:
While trying to copy data into the vector
I get the following error messages:
stl_algobase.h:247: error: no match for 'operator*' in '*__result'
stl_algobase.h:249: error: no match for 'operator++' in '++__result'
__result is the vector's OutputIterator
the ecode segement that gives me this problem is:
typedef std::vector< float > floatV;
|
by: jeremit0 |
last post by:
I'm trying to sort a vector<complex<double and can't figure it
out. I recognize the problem is that there isn't a default operator<
for complex data types. I have written my own operator and can use
it, but std::sort doesn't seem to find it. I have copied a very
simple example below. Everything compiles just fine when the line
with std::sort function is commented out, but with that line included
a whole slew of errors are given like:
...
|
by: orangemonkey |
last post by:
#include <iostream>
#include <math.h>
#include <vector>
using namespace std;
int main (void) {
int sv = 0, fv = 0;
cout << "Start Value:" << endl;
|
by: marktang |
last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look !
Part I. Meaning of...
|
by: Hystou |
last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it.
First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
| |
by: Oralloy |
last post by:
Hello folks,
I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>".
The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed.
This is as boiled down as I can make it.
Here is my compilation command:
g++-12 -std=c++20 -Wnarrowing bit_field.cpp
Here is the code in...
|
by: agi2029 |
last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own....
Now, this would greatly impact the work of software developers. The idea...
|
by: isladogs |
last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM).
In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules.
He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms.
Adolph will...
|
by: conductexam |
last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one.
At the time of converting from word file to html my equations which are in the word document file was convert into image.
Globals.ThisAddIn.Application.ActiveDocument.Select();...
|
by: TSSRALBI |
last post by:
Hello
I'm a network technician in training and I need your help.
I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs.
The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols.
I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
|
by: adsilva |
last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
| |
by: 6302768590 |
last post by:
Hai team
i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
| |