You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I try to write the content that needs to be communicated into the document, and then complete the communication process by moving the document. For example, in the receiver, I want to use the save method of SenderOperationParms to write ParamsRequest into the document, and the sender uses the load method to read ParamsRequest from the document. But it failed, and the ParamsRequest after reading can't be used normally. Code as follow:
error as :
The text was updated successfully, but these errors were encountered:
The problem is probably that you are not writing in binary mode, so your fstream is corrupting the saved data with some newline translations. To fix, specify std::ios::binary as the mode when opening your streams. To be clear, writing the request doesn't produce a "text file" in the sense that your file naming misleadingly suggests.
I try to write the content that needs to be communicated into the document, and then complete the communication process by moving the document. For example, in the receiver, I want to use the save method of
SenderOperationParms
to writeParamsRequest
into the document, and the sender uses the load method to readParamsRequest
from the document. But it failed, and theParamsRequest
after reading can't be used normally. Code as follow:error as :
The text was updated successfully, but these errors were encountered: