I hope to copy from container to another container.
But it is not easy. gdb said I'm trying to copy const string to string.
---------------------------------------------------------------------------------
0x00007ffff7b760f3 in std::string::assign(std::string const&) ()
from /usr/lib/libstdc++.so.6
---------------------------------------------------------------------------------
I don't know how to copy from container to container one by one.
WiIl you help me? thanks you.
This is my code.
---------------------------------------------------------------------
typedef class file_info
{
public:
int ino_no;
string file_nm;
} file_inf;
vector<file_inf> input_stl; //Original container declaration
copy_123() {
vector<file_inf> inputA_stl;
vector<file_inf> inputB_stl;
for(i = 1; i < input_stl.size(); i++)
{
j = i + 1;
if(input_stl[i].ino_no != input_stl[j].ino_no)
{
inputA_stl[j].file_nm =input_stl[j].file_nm;
Acount++;
}
}
}