--- In [email protected], "nimak247" <[EMAIL PROTECTED]> wrote:
> My program crashes at the point shown below. This message was a bit
> different, though. It said the failure was at xstring, line 137?
>
> I don't know what caused it. How does one debug one of these
> types of
> messages??
Try printing out str to see that it contains exactly what it is
supposed to contain. And probably you can also check the value of each
element that iterator iterates over in the loop below.
> vector<string> ret;
> iter pos = str.begin(), e = pos;
>
> for(int x = 0; e != str.end() && x != 10; x++){
> ++e;
> }
>
> ret.push_back(string(pos, e)); /*--program fails here--*/
If you can make a small test case and post it on the group then
probably more people can help you out.
Regards,
Saurabh