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

I'd love to help, but there are just too many unexplained variables floating around in this clip. I can't make sense of it.

This is why when posting you should:

  1. comment your code
  2. provide a clear description of what the code is supposed to do