The first argument for the pointer to a memory buffer
The second parameter for the size of the write
Existing vector container to store the data to the data written to the file within the container, debugging can write so many times, & amp; Vector [0], the vector data () is used, is unable to succeed
CodePudding user response:
I'm fine,STD: : vector
Int * p=NULL;
Data. The push_back (1);
Data. The push_back (2);
Data. The push_back (3);
Data. The push_back (4);
Data. The push_back (5);
P=data. The data ();
Memory is a continuous 12345
In what ways do you open the file? Should be binary
CodePudding user response:
STD: : vector