For some reason when I try to pass a string that is this:
'man!';
Into the first param of copy and the value of 4 in to the second param and 6 into the last argument for some reason copy is adding duplicate characters in the string. Then it comes out like so:
man!!';
It's kinda odd because if I form the string into a sentence it works fine, because of the spaces can someone help me out why it's doing this? I just want it to get the man! part. Just exclude the '; part.
Code:
'man!';
Into the first param of copy and the value of 4 in to the second param and 6 into the last argument for some reason copy is adding duplicate characters in the string. Then it comes out like so:
man!!';
It's kinda odd because if I form the string into a sentence it works fine, because of the spaces can someone help me out why it's doing this? I just want it to get the man! part. Just exclude the '; part.
Code:
Code:
size_t i_mFound; int RB; int RE; int length; i_mFound = sData.find("'"); if (i_mFound!=std::string::npos) { RB = int(i_mFound); RB++; } i_mFound = sData.find("';"); if (i_mFound!=std::string::npos) { RE = int(i_mFound); } length = RE - RB; length=sData.copy(szFilename,length,RB);
Comment