Im having problems writing string into a binary file. This is my code:
ofstream outfile(\"myfile.txt\", ofstream::binary); std::string text = \"Text\"; outfi
std::string
sizeof
You should try:
string text = "Text"; outfile.write(text.c_str(), text.size());
or
outfile << text;