Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR CPP

C++ Dynamic allocation failing

int * foo;
foo = new (nothrow) int [5];
if (foo == nullptr) {
  // error assigning memory. Take measures.
}
Source by www.cplusplus.com #
 
PREVIOUS NEXT
Tagged: #Dynamic #allocation #failing
ADD COMMENT
Topic
Name
5+5 =