first fix the following compiler warning (do not ignore those).
Type: Posts; User: gil_savir
first fix the following compiler warning (do not ignore those).
Fear not. I'm a private teacher who is bound to the constraints of a (to my opinion) not too sharp professor that teaches this subject to one of my students. gets() is long out of my own functions...
let start by giving types to the parameters in:
void read(input2,i)
This is not a state of the art code. I have it from previous assignment one of my students made. The comments are quiet explanatory.
If what you mean is graphical games, then I suggest you take a...
What I mean is a debugger that keeps stack records, even after "poping" calls from the stack-head. Doing this in a tree manner, such that even after exiting a call in the stack, I could access this...
you are doing it again. 3rd thread for the partition problem...
esbo, your if condition will always result in TRUE. I guess you meant:
if ( sex!='M' && sex!='F') ...
transgalactic2. you have opened two threads for the same problem.
http://cboard.cprogramming.com/showthread.php?t=111139
please make sure one of the administrators will unify the two. Also note it...
your partition(...) function has two major problems:
1. The two lines quoted above assign values to the local variables sum1 and sum2, but then these variables are not used anywhere. I'm sure your...
I never said they have to be mixed with each other. If each recursive function will span out two recursive calls - the one adds current integer to the sum of set1 and the other adds current integer...
Most debuggers (also the one on Eclipse) show call-STACK. However, I would like to see a call-TREE. In some recursive functions, the call-stack is not enough for understanding which call is the...
What brewbuck said is your key for the solution.
although I would formulate it differently: try each time to put the current integer in sum for set1 or for set2. if any of the calls ends...
Thanks guys. That really helps understanding my mistake. I was working on the same exercise and got to a code similar to dwks' code. I had a small flaw, which was very difficult to trace.
BTW, the...