David Newton wrote:Please KeepItDown.
So, follow the code: I'm still not convinced you ever work out anything on paper--this is a *critically* important skill.
1) What does BTree.add(int) do?
2) What does the Node constructor do?
3) Question answered, correct?
That's all it takes: you only had to look at a few lines of code to determine the answer.
David Newton wrote:...
Is this code that you wrote yourself?
David Newton wrote:You're a ways off from being able to provide those services--best to focus on basics for now.
John Todd wrote:Man, you should really decide by now.
https://coderanch.com/t/505960/iphone/Mobile/learning-program-iphone-worth-it
David Newton wrote:You start on the Apple iOS developer site, possibly by picking up a book or two, learning Objective-C, and buying a Mac if you don't already have one.
Yes, it will confuse you learning both at the same time: if you were more advanced at Java/programming in general, I don't think it would be a major issue. But it's even *more* important when using C-like languages to pay very close attention to what you're doing. And if your OO fundamentals are weak, the combination of C and Smalltalk isn't likely to go over very well.
Campbell Ritchie wrote:Do you have Pawn objects and Bishop objects and Knight objects, etc?
David Newton wrote:The code above will not compile--do you understand that? You need to post the exact code that doesn't work the way you expect, you need to state how you want your code to work, and so on.
David Newton wrote:If the debugged bishop code works, what's the issue? The rook code?
You're confusing on several levels... And please, *please* format your code.
David Newton wrote:(And I can't tell if you have a cut-and-paste error in your code, or if it's what you really mean: perhaps posting an explanation of your algorithm would also be useful to the dwindling number of people that are still trying to help.)
David Newton wrote:I think you misunderstood me: an "error" is anything that doesn't work the way you want it to. What I asked for was a board configuration that exhibits the error--rather than making us reverse engineer *everything*, provide an SSCCE for us to examine. It's difficult enough to read your code without having to also figure out how to create a scenario that causes the undesired behavior.
David Newton wrote:It'd be a lot easier to help if you posted a board configuration that exhibits the error/