问题描述
我用指针和new关键字编写了Complex类,用于在堆中分配内存。我重载了+运算符和=运算符。一切正常,直到我使用析构函数释放分配的内存。析构函数导致Visual Studio中的运行时错误。 。我认为这与导致此问题的堆上的内存分配无关。在Visual Studio上运行代码。我还注意到析构函数的问题与重载+运算符有关。请帮助我克服这个问题。在VS
Schema::create('articulos',function (Blueprint $table) {
$table->unsignedBigInteger('id');
$table->unsignedBigInteger('descuento_id');
$table->string('categoria',50)->nullable();
$table->string('nombre',100);
$table->string('codigo_comercial',50)->unique()->nullable();
$table->string('codigo_interno',35)->nullable();
$table->enum('tipo',['interno','externo'])->default('externo');
$table->string('marca',50)->nullable();
$table->double('existencia',8,2)->default('0');
$table->enum('status',['activo','suspendido'])->default('activo');
$table->tinyinteger('stock',1)->nullable();
$table->text('descripcion')->nullable();
$table->integer('max')->nullable();
$table->integer('min')->nullable();
$table->string('unidad_medida',40);
$table->string('codigo_producto_sat',255)->nullable();
$table->string('codigo_unidad_sat',255)->nullable();
$table->string('subcategoria',50)->nullable();
$table->string('subsubcategoria',50)->nullable();
$table->string('modelo',255)->nullable();
$table->json('presentaciones')->nullable();
$table->string('imagen',255)->nullable();
$table->json('impuestos_compra');
$table->json('impuestos_venta');
$table->enum('validar_peso',['si','no'])->default('no');
$table->softDeletes();
$table->timestamps();
解决方法
暂无找到可以解决该程序问题的有效方法,小编努力寻找整理中!
如果你已经找到好的解决方法,欢迎将解决方案带上本链接一起发送给小编。
小编邮箱:dio#foxmail.com (将#修改为@)