Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.c++ > #11838

Re: Can't see to pass the lowestScore variable to the Main function.

From Richard Damon <news.x.richarddamon@xoxy.net>
Newsgroups comp.lang.c++
Subject Re: Can't see to pass the lowestScore variable to the Main function.
Date 2011-11-25 20:04 -0500
Organization A noiseless patient Spider
Message-ID <japdvk$jp4$1@dont-email.me> (permalink)
References <4b774690-2897-4cbf-9c09-af4492e9bd78@q9g2000yqe.googlegroups.com>

Show all headers | View raw


On 11/25/11 7:20 PM, Russell Stanford wrote:
> Can anyone help me figure out why the lowestScore variable is not
> passed to the Main function. I can get it to return in one function
> but not two functions. Any suggestions, I am sure this is a no
> brainer, but I have been fiddling with this for too long now.
> 
> 

Why are you expecting it to make it to main?

You explicitly return it from findlowest, and calcAverage gets that
value and saves it by


lowestScore - findLowest(s1, s2, s3, s4, s5, s6);

but calcAverage doesn't ever send it back to main.

Note, you should be getting a diagnostic (or you made a copy/paste
error) in calcAverage, because it doesn't declare the variable
lowestScore, which is uses.

Back to comp.lang.c++ | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread


Thread

Can't see to pass the lowestScore variable to the Main function. Russell Stanford <russell.stanford@g.austincc.edu> - 2011-11-25 16:20 -0800
  Re: Can't see to pass the lowestScore variable to the Main function. jt@toerring.de (Jens Thoms Toerring) - 2011-11-26 00:58 +0000
  Re: Can't see to pass the lowestScore variable to the Main function. Richard Damon <news.x.richarddamon@xoxy.net> - 2011-11-25 20:04 -0500
  Re: Can't see to pass the lowestScore variable to the Main function. red floyd <no.spam.here@its.invalid> - 2011-11-25 17:12 -0800

csiph-web