Error when using std::less


I get this error when I run my program: red_black_tree.cpp:188: error: no matching function for call to std::less::less(MyObj&, MyObj&) /usr/lib/gcc/i486-linux-gnu/4.1.2/../../../../include/c++/4.1.2/bits/stl_function.h:224: note: candidates are: std::less::less() /usr/lib/gcc/i486-linux-gnu/4.1.2/../../../../include/c++/4.1.2/bits/stl_function.h:224: note: std::less::less(const std::less&) The code is rather comprehensive so I have ...
Posted On: Monday 26th of November 2012 12:48:46 AM Total Views:  229
View Complete with Replies

RELATED TOPICS OF C Language PROGRAMMING LANGUAGE




External Exception Linker error C0000008, Invalid HANDLE.

Spent the day looking into External Exception Linker error C0000008": My CppBuilder application gave me exception when run in Debugger mode but works fine when started from explorer. There is information on this message by looking in CppBuilder: Tools/Options/Debugger Options/Native ...
VIEWS ON THIS POST

90

Posted on:

Sunday 25th November 2012
View Replies!

Help needed on "no match function error"

I am learning template programming now, and I wrote the following code #include #include "Queue.h" using namespace std; template class QueueItem { public: QueueItem(T item):value(item),next(0){} T value; QueueItem *next; }; template class Queue { private: ...
VIEWS ON THIS POST

148

Posted on:

Sunday 25th November 2012
View Replies!

error: no match for ?operator

Is the problem with the 2 functions\t G++ gives such type of error. #include using namespace std; int i, j; int myarr[10] = {1, 2, 3, 4, 5, 6, 7, 8, 9}, arr1[10] = {11, 12, 13, 14, 15, ...
VIEWS ON THIS POST

130

Posted on:

Sunday 25th November 2012
View Replies!

Some strange error

I took old code and decided to modify it a bit, and I just noticed that it does not compile at all and before server one of severs (main) crashed in the system it was working fine (I am really ...
VIEWS ON THIS POST

163

Posted on:

Sunday 25th November 2012
View Replies!

linker error in virtual function

Hi Everyone, I have the following polymorphic classes, class Shape { public : virtual void draw() { } virtual void sample(); }; class Circle : public Shape { public : virtual void draw() { cout<<"Circle::draw"<
VIEWS ON THIS POST

150

Posted on:

Sunday 25th November 2012
View Replies!

template template parameter compilation errors!!!

, I got a Mac and I'm trying to compile my code on Mac OS using GCC 4.3. My code used to compile just fine in Ubuntu with the same compiler but now it's giving me errors in all ...
VIEWS ON THIS POST

107

Posted on:

Sunday 25th November 2012
View Replies!

Linking error

1>IntroState.obj : error LNK2019: unresolved external symbol "public: void __thiscall GameState: ushState(class GameState *)" ( pushState@GameState@@QAEXPAV1@@Z) referenced in function "public: virtual void __thiscall IntroState::keyReleased(class OIS::KeyEvent const &)" (keyReleased@IntroState@@UAEXABVKeyEvent@OIS@@@Z) 1>bin\Debug\SparkRushBuild.exe : fatal error LNK1120: 1 unresolved externals Any idea of what ...
VIEWS ON THIS POST

61

Posted on:

Sunday 25th November 2012
View Replies!

handling SING errors

I am using C++ Builder 6. I am calling log10(x) and due to the erroneous value of x I am getting "log10: SING error" message box. I would like to handle this exception myself. Please let me know how to ...
VIEWS ON THIS POST

67

Posted on:

Sunday 25th November 2012
View Replies!

destructing error

used code: #include "Vecmath.h" #include using namespace std; int main(){ Vector v = Vector(4.0, 4.0, 2.0); cout << "(" << v.x << ", " << v.y << ", " << v.z << ")" << endl; cout << "length: " ...
VIEWS ON THIS POST

63

Posted on:

Sunday 25th November 2012
View Replies!

Compiler error dependent name is not a type prefix with 'typename' toindicate a type

Hi Friends, I'm getting a compile error on vs2005 that I dont understand. The help explains that this is a breaking change for VC++.NET 2005 compiler, made in order to conform to the ISO C++ standard, and I've tried it ...
VIEWS ON THIS POST

127

Posted on:

Sunday 25th November 2012
View Replies!

why no ambiguity error generated

consider the following program: #include using namespace std; class my_complex { public: friend ostream & operator<<(ostream &os, const my_complex &c); my_complex(double r, double i = 10.0) : re(r), im(i) { } my_complex(const my_complex &rc) : re(rc.re), im(rc.im) { } ...
VIEWS ON THIS POST

92

Posted on:

Sunday 25th November 2012
View Replies!

How to view g++ long error message

I am using g++ to compile a program. g++ outputs so many warnings and errors that I cannot see the first error message that I think I should fix first I try to use 'g++ exer.cc | less' but it ...
VIEWS ON THIS POST

64

Posted on:

Sunday 25th November 2012
View Replies!

Strange error with std::vector

When I compile this code: std::vector TSTrow[TESTnum]; .... char *tmp=new char[32]; sprintf(tmp, ...); TSTrow[(int)lpParam].push_back(tmp); I get this error: "E2316 'push_back' is not a member of 'std::vector >'" but 'push_back' *is* a member of std::vector! Does it make ...
VIEWS ON THIS POST

112

Posted on:

Sunday 25th November 2012
View Replies!

Why there is an error?

, recently I read the book "c++ template complete guide", there is a slice code that I am quite confused. (pasted here). Why there is an error Actually I can compile it on Linux, and there is only an ...
VIEWS ON THIS POST

485

Posted on:

Sunday 25th November 2012
View Replies!

Strange error with iterators

I've wrote this function which should add a comma for every 3 digits in a number (so that it looks something like 5,000). This is my function: std::string formatNumber(int number) { // Convert the int to a string. std::string ...
VIEWS ON THIS POST

467

Posted on:

Sunday 25th November 2012
View Replies!

ICC with -cxxlib-gcc --- results in ld: /usr/lib/crtbeginS.o: No such file error

Hi , I am compiling my c++ code with ICC 8.0 compiler with -cxxlib-gcc option...But this results in following error.. /usr/lib/crtbeginS.o : No such file: No such file or directory Though I am including the Path for crtbeginS.o . Code ...
VIEWS ON THIS POST

671

Posted on:

Sunday 25th November 2012
View Replies!

C# calling C++ error (instruction at referenced memory could not be read)

I have a C# assembly that is calling directly into C++ unmanaged code. Everything is working fine but at the very end of the process I get an application error, which says: "The instruction at (hexNumber) referenced memory at ...
VIEWS ON THIS POST

502

Posted on:

Monday 26th November 2012
View Replies!

compile time errors due to changes in stl_list.h code

I am trying to get rid of compile time error that I am getting only in RHEL5 (not in RHEL4) apparently due to the changes in the stl_list.h file. The error that I am getting is coming from the following ...
VIEWS ON THIS POST

462

Posted on:

Monday 26th November 2012
View Replies!

specialaizing templates --error

, I 'm writitng a simple program which contains the following template template int exch(T& t1 ,T& t2){ T tmp ; tmp = t1; t1 = t2; t2 = tmp; return 1; } When i run this for ...
VIEWS ON THIS POST

442

Posted on:

Monday 26th November 2012
View Replies!

New header leads to name clashes

The most recent state of http://www.open-std.org/jtc1/sc22/wg...007/n2241.html as well as the current draft N2284 (section [syserr], p.2) proposes a new enumeration type posix_errno immediatly in the namespace std. One of the enumerators has the name invalid_argument, or fully qualified: std::invalid_argument. This ...
VIEWS ON THIS POST

540

Posted on:

Monday 26th November 2012
View Replies!