Quick question, why are you calling delete[] on stack allocated memory?
You run the risk of segfaults and all that sort of deliciousness.Code:char ptc[256]; sprintf(ptc,"%s %.3f",this->base.c_str(),this->fOn); this->finalCommandOn = std::string(ptc); sprintf(ptc,"%s %.3f",this->base.c_str(),this->fOff); this->finalCommandOff = std::string(ptc); delete[] ptc;
C++ calling delete on variable allocated on the stack - Stack Overflow