[RESOLVED] string positions
I have file looking something like this
Code:
qwe||$|aa|$|bgb|$|
asd||$|bab|$|adw|$|
zxc||$|ccd|$|wda|$|
This code should is supposed to show me a messagebox with content of strings between "|$|",
for example:
But its giving weird output. I'm guessing it has to do something with positions, but dunno what.
Code:
String ^ message;
string part;
size_t pos, pos2;
pos = line.find("|$|");
while (pos < line.rfind("|$|"))
{
pos2 = line.find("|$|", pos+3);
part = line.substr(pos+3, pos2);
pos = pos2;
message = String::Concat(message, strToStr(part),"\n");
}
MessageBox::Show(message, "You have");
btw... strToStr() is converting from std::string to String and vice versa.
Re: [RESOLVED] string positions
ah.. I thought Array::Length returns how many symbols there are in whole array xD so I excluded it from possible variants.
Seems I mixed up what is element and what's dimension (~_~')