si es que el error con delete me lo da cuando uso new osea hize esta prueba para ver como pifaba.<br><br>
<meta name="qrichtext" content="1"><meta http-equiv="Content-Type" content="text/html; charset=utf-8"><style type="text/css">
p, li { white-space: pre-wrap; }
</style>
<p style="margin: 0px; text-indent: 0px;">#include <iostream></p>
<p style="margin: 0px; text-indent: 0px;">#include <new></p>
<p style="margin: 0px; text-indent: 0px;"></p>
<p style="margin: 0px; text-indent: 0px;">using namespace std;</p>
<p style="margin: 0px; text-indent: 0px;"></p>
<p style="margin: 0px; text-indent: 0px;">int main(void)</p>
<p style="margin: 0px; text-indent: 0px;">{</p>
<p style="margin: 0px; text-indent: 0px;">      int n, i = 0;</p>
<p style="margin: 0px; text-indent: 0px;">      char *pC = NULL;</p>
<p style="margin: 0px; text-indent: 0px;"></p>
<p style="margin: 0px; text-indent: 0px;">      cout << "Ingrese: ";</p>
<p style="margin: 0px; text-indent: 0px;">      cin >> n;</p>
<p style="margin: 0px; text-indent: 0px;"></p>
<p style="margin: 0px; text-indent: 0px;">      pC = new char[n];</p>
<p style="margin: 0px; text-indent: 0px;"></p>
<p style="margin: 0px; text-indent: 0px;">      for(; i < n;)</p>
<p style="margin: 0px; text-indent: 0px;">              pC[i++] = 'a';</p>
<p style="margin: 0px; text-indent: 0px;">      </p>
<p style="margin: 0px; text-indent: 0px;">      pC = new(pC) char[n+1];</p>
<p style="margin: 0px; text-indent: 0px;"></p>
<p style="margin: 0px; text-indent: 0px;">      pC[i] = 'b';</p>
<p style="margin: 0px; text-indent: 0px;"></p>
<p style="margin: 0px; text-indent: 0px;">      </p>
<p style="margin: 0px; text-indent: 0px;">      for(int j = 0; j < n+1; j++)</p>
<p style="margin: 0px; text-indent: 0px;"></p>
<p style="margin: 0px; text-indent: 0px;">              cout << *pC++ << endl;</p><p style="margin: 0px; text-indent: 0px;"><br></p><p style="margin: 0px; text-indent: 0px;">        delete [] pC;<br></p>
<p style="margin: 0px; text-indent: 0px;"></p>
<p style="margin: 0px; text-indent: 0px;"></p>
<p style="margin: 0px; text-indent: 0px;">}</p><p style="margin: 0px; text-indent: 0px;"><br></p><p style="margin: 0px; text-indent: 0px;">muestra las letras todo perfecto pero el error es al liberar la memoria.<br></p><br>
<br clear="all"><br>-- <br>Seamos realistas y hagamos lo imposible<br>Linux Counter User #487374<br><br>---<br>Nosotros los complacientes, guiados por lo desconocido, estamos haciendo lo imposible para los ingratos, y hemos estado haciendo tanto por tanto tiempo con tan poco, que ahora estamos capacitados a hacer cualquier cosa con nada<br>