bug-gmp
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

C++ wrapper, mpf << operator overloading


From: Garrett Kajmowicz
Subject: C++ wrapper, mpf << operator overloading
Date: Tue, 17 Sep 2002 20:13:18 -0400
User-agent: KMail/1.4.1

FYI:  This is my first attempt at writting a C++ program, so the fault COULD 
BE MINE.

I am recieving compile error : 
/usr/include/gmpxx.h:34: undefined reference to `operator<<(ostream &, 
__mpf_struct const *)'
/usr/include/gmpxx.h:34: undefined reference to `operator<<(ostream &, 
__mpf_struct const *)'

The code being compiled is:

extern ostream& operator<<(ostream& os, Vertex v){
        os << "(" << v.Get_x_position() << ", " << v.Get_y_position() << 
")";//Line34
        return os;
}

Prototypes for Get_x_position and Get_y_position:
mpf_class Get_x_position(void);
mpf_class Get_y_position(void);

I am attempting to provide cout <<Vertex dunctionality for my class.
If the error is mine, please accept my sincerest thanks for a great library (I 
can hgandle it well in regular 'C').

-       Garrett Kajmowicz




reply via email to

[Prev in Thread] Current Thread [Next in Thread]