Search:
Forum
General C++ Programming
code help
code help
Apr 27, 2011 at 2:32am UTC
rickycab
(1)
I need to read data from a file and I know im missing a while loop. the name of the file is "books.dat"
I need to take this:
fp>> books;
fp>> shipping;
for (int i=1; i <= books; i++)
{
fp>>prices;
sum+=prices;
}
and have it nested on a while loop.
Apr 27, 2011 at 6:28am UTC
screwzm
(2)
1
2
3
4
5
for
(
int
i=1; i <= books && fp; i++) { fp>>prices; sum+=prices; }
Topic archived. No new replies allowed.
C++
Information
Tutorials
Reference
Articles
Forum
Forum
Beginners
Windows Programming
UNIX/Linux Programming
General C++ Programming
Lounge
Jobs