Home > Software engineering >  I now use the vector storage need to read the content, to detect the contents of the storage is corr
I now use the vector storage need to read the content, to detect the contents of the storage is corr

Time:02-04

How to save the contents of the storage to TXT documents displayed

CodePudding user response:

How can you use the vector? Vector ?????
Out the traverse the vector data, and write files ~
For (vector : : const_iterator iter=vec. The begin (); iter !=vec. End (); + + iter)
{
//...
}

CodePudding user response:

reference 1st floor VisualEleven response:
vector: how do you use? Vector ?????
Out the traverse the vector data, and write files ~
For (vector : : const_iterator iter=vec. The begin (); iter !=vec. End (); + + iter)
{
//...
}
yes

CodePudding user response:

refer to the second floor a654420293 response:
Quote: refer to 1st floor VisualEleven response:

How can you use the vector? Vector ?????
Out the traverse the vector data, and write files ~
For (vector : : const_iterator iter=vec. The begin (); iter !=vec. End (); + + iter)
{
//...
}
yes


refer to the second floor a654420293 response:
Quote: refer to 1st floor VisualEleven response:

How can you use the vector? Vector ?????
Out the traverse the vector data, and write files ~
For (vector : : const_iterator iter=vec. The begin (); iter !=vec. End (); + + iter)
{
//...
}
yes

You don't observe_o this class spending serialization?
Five main steps are required to make a class serializable. They are listed below and explained in the following sections:

Deriving your a class from CObject (or from some class derived from CObject).

Overriding the Serialize member function.

Using the DECLARE_SERIAL macro in the class declaration.

Defining a constructor that takes no arguments.

Using the IMPLEMENT_SERIAL macro in the implementation file for the class.

If you call the Serialize directly rather than through the & gt; & gt; and


A vision or a little bit more simple, you a for loop to retrieve each observe_o element, will observe_o class object information formatted as a string, and then can be deposited in the file,

CodePudding user response:

reference VisualEleven reply: 3/f
Quote: refer to the second floor a654420293 response:

Quote: refer to 1st floor VisualEleven response:

How can you use the vector? Vector ?????
Out the traverse the vector data, and write files ~
For (vector : : const_iterator iter=vec. The begin (); iter !=vec. End (); + + iter)
{
//...
}
yes


refer to the second floor a654420293 response:
Quote: refer to 1st floor VisualEleven response:

How can you use the vector? Vector ?????
Out the traverse the vector data, and write files ~
For (vector : : const_iterator iter=vec. The begin (); iter !=vec. End (); + + iter)
{
//...
}
yes

You don't observe_o this class spending serialization?
Five main steps are required to make a class serializable. They are listed below and explained in the following sections:

Deriving your a class from CObject (or from some class derived from CObject).

Overriding the Serialize member function.

Using the DECLARE_SERIAL macro in the class declaration.

Defining a constructor that takes no arguments.

Using the IMPLEMENT_SERIAL macro in the implementation file for the class.

If you call the Serialize directly rather than through the & gt; & gt; and


A vision or a little bit more simple, you a for loop to retrieve each observe_o element, will observe_o class object information formatted as a string, and then can be deposited in the file,
can be more specific
  • Related