Date: Fri, 5 Apr 2002 16:39:51 +1000 From: Edwin Groothuis <edwin@mavetju.org> To: Chad David <davidc@acns.ab.ca> Cc: questions@freebsd.org Subject: Re: C++ Question Message-ID: <20020405163951.E56548@k7.mavetju.org> In-Reply-To: <20020404233047.A8398@colnta.acns.ab.ca>; from davidc@acns.ab.ca on Thu, Apr 04, 2002 at 11:30:47PM -0700 References: <20020404233047.A8398@colnta.acns.ab.ca>
next in thread | previous in thread | raw e-mail | index | archive | help
On Thu, Apr 04, 2002 at 11:30:47PM -0700, Chad David wrote:
> I realize this isn't really a FreeBSD question, but...
>
> I'm porting a bunch of code to FreeBSD and I've run into the following:
>
> int do_xyz(String &s1, String &s2 = String(), String &s3 = String());
>
> g++ complains fails with the following:
>
> file.h:100: invalid type `String' for default argument to `String &'
Not bothered by any knowledge, but what if you remove the assignments
from the prototyping?
int do_xyz(String &s1, String &s2, String &s3);
And then let the function definition the same (i.e. with the assignments).
Edwin
--
Edwin Groothuis | Personal website: http://www.MavEtJu.org
edwin@mavetju.org | Interested in MUDs? Visit Fatal Dimensions:
------------------+ http://www.FatalDimensions.org/
To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-questions" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20020405163951.E56548>
