- #include <iostream>
- #include <boost/filesystem.hpp>
- using namespace boost::filesystem;
- int main(int argc, char* argv[])
- {
- if (argc < 2) {
- std::cout << "Usage: tut1 path\\n";
- return 1;
- }
- std::cout << argv[1] << " " << file_size(argv[1]) << '\\n';
- return 0;
- }
- //该片段来自于http://www.codesnippet.cn/detail/260520149653.html
来源: http://www.codesnippet.cn/detail/260520149653.html