Welcome to Laser Pointer Forums - discuss green laser pointers, blue laser pointers, and all types of lasers

Buy Site Supporter Role (remove some ads) | LPF Donations

Links below open in new window

FrozenGate by Avery

C++






Have you tried using size_type variables instead of int? I know that it may cause problems sometimes depending on the compiler...

std::string temp = b;
std::string::size_type index = temp.find("hello",0);

while(index != std::string::npos)
{
temp.replace(index, 5, "hi", 2);
index = temp.find("hello",index);
}

GL;
DDL
 
It's funny how I do most of my code thinking while away from the computer... ;D

I go away and start thinking in code... then come back with a little fix I had ignored somewhere...

--DDL
 
OK, I used your suggestion DDL, it doesn't crash now but for some reason the data gets messed up...
 
i do C++. haven't done it in a while. Not that good in it either. Haven't needed it enough to learn a lot.
 





Back
Top