loop help?

I cannot attach a screen shot but this code compiles.

Ehh no it does not at all. It would be much easier if you actually provided a piece of code that compiles and reproduces your problem.

if (hold = f)

= is an assignment operator.
== is a comparison operator. You want to compare hold and f, so use this instead.
Last edited on
right... Do you really want me to post my entire program here? Hundreds of lines of code just to fix one loop problem?


If you would have read more carefully, I did not say this in any way shape or form. I said a piece of code that reproduces your problem and compiles. In the code you provided only radius[] is unknown, so it wouldnt be too hard providing a very small example.
closed account (iTpfizwU)
If you had read more carefully.

I can only submit something that complies if and only if I submit my entire program.

radius[] is created from 5 functions and 2 other loops.
You could easily hardcode a few values into radius[].
All he's telling you to do is make a complete and minimal example that demonstrates your problem instead of just code fragments. See : http://sscce.org/

Besides what's already been said, the recursion logic in your factor function seems to be wrong. Ex: Line 10 - you do nothing with the value returned by factor(x / num); call.
so could you. Are you going to continue to waste my time or are you going to help?

You're the one who wants other people to give up their time and energy in helping you. The responsibility is on you to do as much as possible to make it easy for us to help you. Not to sit there and complain that we're not jumping through enough hoops for you.
Topic archived. No new replies allowed.