That will print and its what i expected that was part a of the program

Code:
"go
4
expert"

i tried

Code:
			if(n==pos)
			{	
				len=1;
				pos=0;
			}
				
			
			else if(n==string::npos)
				len=t.size()-pos;
			
			else
			{
				pos += s.size();
				len=n-pos;
			}
but it created an infinite loop so i think pos needs to be 4 now but i have no clue how to do it. We've spent along time on this and I learn better by example any way Please, Please tell what i need to do to fix it (and why otherwise it's pointless). I've used this forum to help with c++ stuff that I dont understand once someone told me what to do and why I understood it better and as a result I Aced my midterm. Thanks for your patience.

Last edited by thekevin07; 7Nov2008 at 07:21..