声明并使用链表 [英] declaring and using a linked list
本文介绍了声明并使用链表的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
这就是我到目前为止:
我的程序!
This is what I have so far:
My program!
展开 | 选择 | 换行 | 行号
推荐答案
我想简单来说,我最好的选择是从简单添加一个carPart然后尝试打印它开始,这是该部分。我还没有实现任何其他功能,想想看链表是否首先填充会更容易!然而,当我尝试将其打印出来时发生的事情就是这样说
列表:
CarPart @ 69b332
我无法弄清楚如何解决这个问题!我假设它是添加carpart因为如果我不添加一个然后它回来为:
列表:
这是我的意思到目前为止!行(49-63和70-73)的变化!!!!!
I figured in simple terms my best bet was to start with a simple adding of a carPart and then trying to print it, here is that section. I have not implemented anything else yet, figured it would be easier to see if the linked list was populating first! However, what is happening when I try to print it out is this it says
List:
CarPart@69b332
and I cant figure out how to fix this! i am assuming it is adding the carpart because if I dont add one then it comes back as:
List:
Here is what I got so far! Changes at Lines (49-63 and 70-73)!!!!!
展开 | 选择 | Wrap | 行号
Ok I已经做了很多改变。这是我的新问题!!!
案例1,2,3和7都正常工作!我无法让案例4正常工作!我还没有尝试过5或6,但是我做了很多改动,所以这两个文件现在部分工作了。
Ok I have made quite a few changes. Here are my new problems!!!
Cases 1, 2, 3, and 7 all work properly! I can not get case 4 to work right! I have not attempted 5 or 6 yet, but I have made alot of changes so here are both files now partially working.
展开 | / span> 选择 | 换行 | 行号
我遇到了同样的问题
这篇关于声明并使用链表的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文