c++ - How to open a file in boost -


i relatively new using boost library c++ , wondering how open file using this. aim read json file not know how open file.

in c++, can this

int main () {   ofstream myfile;   myfile.open ("example.txt");   myfile << "writing file.\n";   myfile.close();   return 0; } 

but how can using boost?

you can use boost::ifstream (which works boost::filesystem::path instance) or use std::ifstream read file.

the actual code depends lot on concrete use-case.


Comments

Popular posts from this blog

c++ - How to add Crypto++ library to Qt project -

jQuery Mobile app not scrolling in Firefox -

How to use vim as editor in Matlab GUI -