Pointers are a powerful tool, but they can be difficult to use correctly, leading to memory leaks and double deletion. Further, they're not usually needed in {cpp} because the language offers abstractions that handle the more difficult aspects of using pointers for you.


== Noncompliant Code Example

----
int *pi = new int;
int *parr = new int[1024];
char *str = new char[1024];
----


== Compliant Solution

----
int i;
std::array<int, 1024> arr;
std:string str;
----


ifdef::env-github,rspecator-view[]
'''
== Comments And Links
(visible only on this page)

include::comments-and-links.adoc[]
endif::env-github,rspecator-view[]
