You are viewing a single comment's thread. Return to all comments →
In C++ malloc() is included in the <cstdlib> header file, which is not included, so you can't use malloc(). Maybe take a look at new?
malloc()
<cstdlib>
new
Seems like cookies are disabled on this browser, please enable them to open this website
Variable Sized Arrays
You are viewing a single comment's thread. Return to all comments →
In C++
malloc()
is included in the<cstdlib>
header file, which is not included, so you can't usemalloc()
. Maybe take a look atnew
?