vector<string> file_pass;
if(count == m2+1)
{
p2_pass = onfile.tellg();
shift = p2_pass-p1_pass;
onfile.seekg(-shift,ios::cur);
for(j=0;j<shift-1;j++)
{
onfile.get(ch);
temp_pass[j] = ch;
}
user_pass.assign(temp_pass,temp_pass+shift-1);
file_pass.push_back(temp_pass);
}
for first input
asthana
it is giving
asthana
but after push back for second input
saxena
it is giving
saxenaa
i know last a is from first input..
please help me in resolving the problem.
so that data in vector will be as they are given i.e
asthana
saxena