you must allocate new char[ len_ + 1 ]. +1 is for '\0'