I need to write a function that will take a string and an int and return the string from index int onward.
for ex
Line = "Enter a line: ";
WriteString(RetStr(Line,4 ));
//Should return er a line:
AnsiString RetStr(AnsiString Str, int Start)
{ int ill;
ill=1;
char temp;
while (Start!=Length(Str))
{
temp=Str[Start];
Str[ill]=temp;
ill=ill+1;
Start=Start+1;
}
return Str;
}
I've tried it in several combinations like trying to use a for loop but Str[ill]=Str[Start+1]
gives some errors that i don't know what to make of them.
Please help...
Any pointers will be greatly appreciated