|
-
November 7th, 2009, 04:20 PM
#10
Re: Functions Problem
You are still not using a function. You use a return statement, you have no function except main to return from. Your book or lecture notes must have an example for a function. Read it. Understand it. Then look again at Post #3 above.
You are still having a condition while (target != SENTINEL) but don't change either value in the loop. The condition can thus be only "always true" or "always false" thus making little sense.
More computing sins are committed in the name of efficiency (without necessarily achieving it) than for any other single reason - including blind stupidity. --W.A.Wulf
Premature optimization is the root of all evil --Donald E. Knuth
Please read Information on posting before posting, especially the info on using [code] tags.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|