guest_user
November 4th, 2008, 02:47 AM
what is this library for?
I don't need to add in #include<new>
to dynamically allocate memory right?
as in
int *pointer = new int;
From here:
http://www.cplusplus.com/doc/tutorial/dynamic.html
it says that in new (nothrow) int;, the nothrow object is declared in the new library but when I tried compiling my program without the header file, no errors were given to me by the compiler and everything worked as per normal, so whats the purpose of the new library?
I don't need to add in #include<new>
to dynamically allocate memory right?
as in
int *pointer = new int;
From here:
http://www.cplusplus.com/doc/tutorial/dynamic.html
it says that in new (nothrow) int;, the nothrow object is declared in the new library but when I tried compiling my program without the header file, no errors were given to me by the compiler and everything worked as per normal, so whats the purpose of the new library?