<html><head><style type="text/css"><!-- DIV {margin:0px;} --></style></head><body><div style="font-family:times new roman, new york, times, serif;font-size:12pt"><div>Hi,<br>There is a method in my class TMyGenome derivd from GAListGenome<AnsiString> as follows:<br><br>void __fastcall TMyGenome::SetGeneString(AnsiString value)<br>{<br> value = value.Trim();<br> int l = value.Length();<br> if(l < FMinLength || l > FMaxLength)<br> throw("Length of genome is too long!");<br> AnsiString s;<br> head();<br> for(l = Length; l > 0;
l--)<br> this->destroy();<br> while(value != "") <br> {<br> l = value.Pos(".");<br> s = value.SubString(1, l - 1);<br> this->insert(s); /*add node*/<br> value = value.SubString(l + 1, value.Length());<br> }<br>}<br><br>However, when the number of calling insert is great than 1 a exception class EAccessViolation with message. Why about it and what can I do.<br></div></div><br>
<hr size=1><a href="http://cn.mail.yahoo.com/" target=blank>
ÑÅ»¢Ãâ·ÑÓÊÏä3.5GÈÝÁ¿£¬20M¸½¼þ£¡</a></body></html>