[an error occurred while processing this directive] [an error occurred while processing this directive][an error occurred while processing this directive] [an error occurred while processing this directive] [an error occurred while processing this directive] [an error occurred while processing this directive] (none) [an error occurred while processing this directive] [an error occurred while processing this directive] [an error occurred while processing this directive] [an error occurred while processing this directive] [an error occurred while processing this directive][an error occurred while processing this directive] [an error occurred while processing this directive][an error occurred while processing this directive] [an error occurred while processing this directive][an error occurred while processing this directive] [an error occurred while processing this directive] [an error occurred while processing this directive] [an error occurred while processing this directive] (none) [an error occurred while processing this directive] [an error occurred while processing this directive] [an error occurred while processing this directive][an error occurred while processing this directive]
 
[an error occurred while processing this directive] [an error occurred while processing this directive]
Skåne Sjælland Linux User Group - http://www.sslug.dk Home   Subscribe   Mail Archive   Forum   Calendar   Search
MhonArc Date: [Date Prev] [Date Index] [Date Next]   Thread: [Date Prev] [Thread Index] [Date Next]   MhonArc
 

Re: [CPROG] stream problemer



Hej

Jeg har lidt svært at se berettigelsen af din funktion, da det jo er en
stream du arbejder med. Jeg vil anbefale en operator overload vha. friend
funktioner.

ekemple på funktion

friend ostream& operator<< (ostream& o , const char * p)
{
	o << p;
	return o;
}

Jeg mener dog stadigvæk ikke du skal bruge en funktion til at udskrive det
din pointer peger på det er ret meget ineffektivt.

//Flemming
On Fri, 20 Jul 2001, Anders Bo Rasmussen wrote:

> On Fri, 20 Jul 2001 15:54:57 +0200,
> Carsten Svaneborg <sslug@sslug> wrote:
>
> >> Nogle forslag?
> > Pointere syntes at løse problemet. Men Udskriv(*out, "..") ser nu ikke så
> > smart ud som Udskriv(out,"..") men det virker.
>
> Så lav Udskriv om, så den tager en pointer:
>
> void Udskriv(ostream *o, char* p) { (*o) << p;}
>
> --
> Anders Bo Rasmussen          mailto:sslug@sslug
> Frimestervej 42 1.tv         http://www.fuzz.dk
> 2400 Kbh. NV
> Denmark
>



 
Home   Subscribe   Mail Archive   Index   Calendar   Search

 
 
Questions about the web-pages to <www_admin>. Last modified 2005-08-10, 20:08 CEST [an error occurred while processing this directive]
This page is maintained by [an error occurred while processing this directive]MHonArc [an error occurred while processing this directive] # [an error occurred while processing this directive] *