"the error", would you clarify what is "the error" explicitly.

来源: LiveInCanada2 2018-05-24 14:12:06 [] [旧帖] [给我悄悄话] 本文已被阅读: 0 次 (1342 bytes)

You have some difficulties to describe things. How old are you? Are you older than 10 years old? Ask your parents to help you to write down
(1) What is your question? What is your expected result of which method. Or you did not even get any result, you got an error message, then, what is the error message you saw?

(2) Both method IsLegal() and containsJQK() are using a global variable, card[], so I need to see how card[] was initialized.

(3) I need to see the callers of these two functions, so I can tell if selectedCards is well initialized.

(4) From style point of view, both methods are written very verbose. Inner loop in IsLegal() is messy. Your project is practicing Object-Oriented, while you are still struggling in control-statements. So I guess that you proceeded too quick. If so, do not to be afraid of failure. Fail sooner is a good thing for a starter.

 

所有跟帖: 

Here -cm930118- 给 cm930118 发送悄悄话 (304489 bytes) () 05/24/2018 postreply 14:33:20

your test is too faraway from the method you suspect. -LiveInCanada2- 给 LiveInCanada2 发送悄悄话 (1267 bytes) () 05/24/2018 postreply 15:16:45

Deck class as follows below: 谢谢! -cm930118- 给 cm930118 发送悄悄话 (0 bytes) () 05/24/2018 postreply 15:24:18

Deck looks good; -LiveInCanada2- 给 LiveInCanada2 发送悄悄话 (1621 bytes) () 05/24/2018 postreply 15:57:53

I did some searching on Google and found out what implementation -cm930118- 给 cm930118 发送悄悄话 (234 bytes) () 05/24/2018 postreply 16:53:00

请您先登陆,再发跟帖!

发现Adblock插件

如要继续浏览
请支持本站 请务必在本站关闭/移除任何Adblock

关闭Adblock后 请点击

请参考如何关闭Adblock/Adblock plus

安装Adblock plus用户请点击浏览器图标
选择“Disable on www.wenxuecity.com”

安装Adblock用户请点击图标
选择“don't run on pages on this domain”