🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: cmu.comp.lang.c++
Article #2

Re: recursive member functions?

#2
From: Andrew Koenig
Date: Mon, 02 Oct 1995 13:55
19 lines
736 bytes
In article <okPr9gS00iV586sWJC@andrew.cmu.edu> Daniel Teitelbaum <dt2m+@andrew.cmu.edu> writes:

> Can member functions call themselves recursively?

Sure.

> Would this work:


> Class Class::Somefunction(Class c)
> {
> Somefunction(c);
> return c;
> }

No, but only because there's nothing to stop the recursion.
-- 
				--Andrew Koenig
				  ark@research.att.com
Technical Details
Message-ID: <DFtqo4.C1G@research.att.com>
Path: arc1-ca.pugleaf.net!in2.uu.net!allegra!alice!ark
References: <okPr9gS00iV586sWJC@andrew.cmu.edu>

Show Full Headers
Complete Article Headers
Newsgroups: cmu.comp.lang.c++,comp.lang.c++
Path: arc1-ca.pugleaf.net!in2.uu.net!allegra!alice!ark
From: ark@research.att.com (Andrew Koenig)
Subject: Re: recursive member functions?
Message-ID: <DFtqo4.C1G@research.att.com>
Organization: AT&T Bell Laboratories, Murray Hill NJ
References: <okPr9gS00iV586sWJC@andrew.cmu.edu>
Date: Mon, 2 Oct 1995 13:55:16 GMT