Write a C++ program to print the size of a file

Write a C++ program to print the size of a file
What problems are you having?
I am a student. I dont know to program
I dont know to program

Then I suggest you learn. We're not going to do your homework for you.
You can start here:
http://www.cplusplus.com/doc/
I already do learn theory part from the link provided
closed account (E0p9LyTq)
Another resource:

http://www.learncpp.com/
There are three logically distinct parts in that program:
1. What file?
2. Determine the size of that file.
3. Print a value.

Each can be implemented independently. That is a key technique: to break larger tasks into smaller and simpler steps.


PS. The future looks interesting:
http://en.cppreference.com/w/cpp/filesystem
Topic archived. No new replies allowed.