🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.lang.c++.leda
Article #37

Re: GRAPH does not print user-defined type of parameter.

#37
From: Marion Sperle
Date: Mon, 14 Aug 1995 09:49
30 lines
1312 bytes
Ashvin wrotes:

>The parameterized graph (GRAPH) does not print the type of the parameter
>for the method write(), if it is user-defined. I'm using LEDA 3.1.2 and g++
>2.6.3. I know that it used to work for LEDA 3.0. Can someone please point
>out the problem/workaround. Sample code and output follow.


>----------------------------------------------------------------------
>#include <LEDA/graph.h>

>class foo {int a;};

>int main()
>{
>    GRAPH<int, string> G;
>    G.write(cout);

>    GRAPH<int, foo> fooG;
>    fooG.write(cout);
>
>}

Do you have defined the function Print(const foo&, ostream&) as friend in your
class foo, which is called by the LEDA-method GRAPH.write() to linearize 
user-defined classes?

I hope I could help you
Marion
Technical Details
Message-ID: <40n66g$bfm@sunsystem5.informatik.tu-muenchen.de>
Path: arc1-ca.pugleaf.net!informatik.tu-muenchen.de!sperle
References: <ASHVIN.95Aug4153322@parrot.bu.edu>

Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!informatik.tu-muenchen.de!sperle
From: sperle@informatik.tu-muenchen.de (Marion Sperle)
Newsgroups: comp.lang.c++.leda
Subject: Re: GRAPH does not print user-defined type of parameter.
Date: 14 Aug 1995 09:49:04 GMT
Organization: Technische Universitaet Muenchen, Germany
Distribution: world
Message-ID: <40n66g$bfm@sunsystem5.informatik.tu-muenchen.de>
References: <ASHVIN.95Aug4153322@parrot.bu.edu>
NNTP-Posting-Host: hphalle9c.informatik.tu-muenchen.de
Originator: sperle@hphalle9c.informatik.tu-muenchen.de