J
Jarek Bednarz
Hi all,
Following code causes strAddress to contain garbage data.
When I decrease number of characters that appear before '\\' then everything
is ok.
12 chars before '\\' seems to be a magic number.
I have compiled it with VisualStudio 2003.
Any ideas?
std::string strAddress = "123456789012\\aaaaa";
std::string::size_type pos = strAddress.find('\\');
if( pos != std::string::npos )
{
strAddress = strAddress.substr( pos + 1, 2 );
}
Thanks in advance for any help.
Jarek
Following code causes strAddress to contain garbage data.
When I decrease number of characters that appear before '\\' then everything
is ok.
12 chars before '\\' seems to be a magic number.
I have compiled it with VisualStudio 2003.
Any ideas?
std::string strAddress = "123456789012\\aaaaa";
std::string::size_type pos = strAddress.find('\\');
if( pos != std::string::npos )
{
strAddress = strAddress.substr( pos + 1, 2 );
}
Thanks in advance for any help.
Jarek