Input File open validation and average
- 状态: Closed
- 奖金: $25
- 参赛作品已收到: 7
竞赛简介
Declare the file stream objects at the same place you declare all other variables (on the top of the block, above the banner section).
Have the stream object "connected" to the file for the smaller possible time. I.e. open just before you are about to use the file and close the connection as soon as you are done (not at the end of the program)
When reading from a file you may assume that the data in the file are the correct type (integers), so no ignore needed and you can read them in the same extraction statement (since there is no prompt).
Remember that the input file should be in the SAME folder as your program
您还可能感兴趣的技能
此竞赛的顶尖作品
-
Sunny767 India
-
Rafalello Poland
-
razifp Indonesia
-
babarrana327 Pakistan
-
Southbite Australia