我需要帮助修复我的程序! [英] I need help fixing my program!

查看:72
本文介绍了我需要帮助修复我的程序!的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我需要帮助我的程序它不是从我的文件中读取信息




这里是我的代码:

如何修复它以使其读取文件。

I need help with my program its not reading information from my file



here is the code i have:
how do i fix it to make it read the file.


展开 | 选择 | Wrap | 行号

推荐答案

您能否发布您正在阅读的文件,以便我可以测试您的程序?此外,结束标记必须是[/ CODE],而不仅仅是另一个[CODE]。谢谢。

编辑:

啊,我想我看到了什么是错的。 numberOfPassengers未初始化。您可能想在程序中给它一些价值,或者从文件中读取它。

希望这会有所帮助。
Can you please post the file you are reading from so that I can test your program? Also, the closing tag has to be a [/CODE], not just another [CODE]. Thanks.

Ah, I think I see what''s wrong. numberOfPassengers is uninitialized. You probably want to give it some value in your program, or read it from the file.
Hope this helps.


抱歉,好的我添加了[/ code]


谢谢
sorry about that,Ok i add the [/code]

thanks




i尝试阅读numberofpassengers但仍无法正常工作,

i尝试使用不同的方式使用while循环但仍然无法正常工作。


我的while循环如下所示:



i tried reading numberofpassengers but still not working,
i tried using a different way by using a while loop and it still wont work.


my while loop looks like this:


展开 | 选择 | Wrap | 行号


这篇关于我需要帮助修复我的程序!的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆