Re: Incorrect values Printed
And the debugging of this program you have done has revealed what?
Re: Incorrect values Printed
As 2kaud said, try the debugger. I'm having trouble making sense of your code. I don't see what you're first loop is trying to accomplish. In setCurrentContract, you're storing the address of a local object, which is never good.
Re: Incorrect values Printed
I applaud you for trying to use code tags, but please try to make the indenting more sensible in the future. The code within the tags is still very messy and hard to read. Also, it is a good idea to post something that others might compile. Produce an example that can be copied and pasted into an online compiler, and just maybe someone here will run it and point out an obvious problem. When you post only snips from different parts of the program, it is impossible for anyone to know what you actually compiled and executed! :ehh:
While doing the above, many people end up finding their own problem and no longer need to post a question.