diff --git a/shared_ptr.htm b/shared_ptr.htm index c534dd7..6c0e999 100644 --- a/shared_ptr.htm +++ b/shared_ptr.htm @@ -61,8 +61,8 @@ shared_ptr<void> p2( new int(5) ); the template parameter. There is almost no difference between using an unsized array, T[], and a sized array, T[N]; the latter just enables operator[] to perform a range check on the index.

-
Example:
shared_ptr<double[1024]> p1( new double(1024) );
-shared_ptr<double[]> p2( new double(n) );
+		
Example:
shared_ptr<double[1024]> p1( new double[1024] );
+shared_ptr<double[]> p2( new double[n] );
 

Best Practices