Created
January 1, 2020 16:03
-
-
Save Ziaeemehr/54dc15e05245aa9a6eb6025466d7dcf6 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// open file as binary: | |
std::ofstream oX((path + "/X.bin").c_str(), std::ios::out | std::ios::binary); | |
// write a vector into the file | |
oX.write((char *)&x[0], x.size() * sizeof x[0]); | |
// close the file | |
oX.close(); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment