S.O.S. Mathematics CyberBoard

Your Resource for mathematics help on the web!
It is currently Sat, 25 May 2013 10:49:45 UTC

All times are UTC [ DST ]




Post new topic Reply to topic  [ 2 posts ] 
Author Message
 Post subject: constructor question
PostPosted: Wed, 29 Jun 2005 10:34:53 UTC 
Offline
Member of the 'S.O.S. Math' Hall of Fame

Joined: Wed, 21 May 2003 10:00:57 UTC
Posts: 377
Location: Australia
Hi, if I have a constructor

IntStack( int n, int v = 0);

Does that mean that I can call IntStack(20) ? If I call IntStack(20, 10) would 10 overwrite the 0 for v?

Thanks!

P.s. Sorry if it seems like I should just work out the answer by writing a program but my home computer doesn't have C++ compiler and I've got an exam in 2 days :S


Top
 Profile  
 
 Post subject: Re: constructor question
PostPosted: Wed, 29 Jun 2005 10:43:26 UTC 
Offline
Member of the 'S.O.S. Math' Hall of Fame

Joined: Thu, 31 Jul 2003 12:36:00 UTC
Posts: 1737
novice wrote:
Hi, if I have a constructor

IntStack( int n, int v = 0);

Does that mean that I can call IntStack(20) ? If I call IntStack(20, 10) would 10 overwrite the 0 for v?

Thanks!

P.s. Sorry if it seems like I should just work out the answer by writing a program but my home computer doesn't have C++ compiler and I've got an exam in 2 days :S


AFAIK yes and yes!


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 2 posts ] 

All times are UTC [ DST ]


Who is online

Users browsing this forum: No registered users


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
Jump to:  
Contact Us | S.O.S. Mathematics Homepage
Privacy Statement | Search the "old" CyberBoard

users online during the last hour
Powered by phpBB © 2001, 2005-2011 phpBB Group.
Copyright © 1999-2013 MathMedics, LLC. All rights reserved.
Math Medics, LLC. - P.O. Box 12395 - El Paso TX 79913 - USA