智能指针:解决内存泄漏的利器
智能指针出现的场景#include<iostream>
using namespace std;
double Divide(int a, int b)
{if (b 0){throw"Divide by zero condition !";}else{return (double)a / (double)b;}
}
void Func()
{int* array1 new int[10];int* array2 new int[10];try{int…
2026/8/4 13:43:21