|
|
Anthony D. Baye <Sha### [at] spamnomorehotmailcom> wrote:
> undefined reference to `geometry::operator<<(std::basic_ostream<char,
You have declared that function, but apparently you have not
implemented it anywhere, therefore the linker cannot find it when
you try to use it.
> friend ostream &operator <<(ostream &, const point3d &);
Ostensibly that function will probably not need anything from your
class that isn't readable through its public interface. It's of course
not wrong, but it would be better to avoid making it a friend function
unless there's a good reason for that.
Just declare it as a function inside your 'geometry' namespace
(and then implement it somewhere, of course.)
--
- Warp
Post a reply to this message
|
|