I need to write a function that will take a string and an int and return the string from index int onward.
for ex
//Should return er a line:Code:Line = "Enter a line: "; WriteString(RetStr(Line,4 ));
//and below is the function
I've tried it in several combinations like trying to use a for loop butCode: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; }
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



LinkBack URL
About LinkBacks


