Jump to content United States-English
HP.com Home Products and Services Support and Drivers Solutions How to Buy
» Contact HP
HP.com home

HP C++ User Documentation

 

bad_alloc (3C++std) - Tru64 UNIX

Standard C++ Library

NAME

  bad_alloc - is the type of the class  which describes the exception thrown
  when a request for storage allocation fails.

SYNOPSIS

  #include <new>

  namespace std {
    class bad_alloc : public exception {
    public:
      bad_alloc() throw();
      bad_alloc(const bad_alloc&) throw();
      bad_alloc& operator=(const bad_alloc&) throw();
      virtual ~bad_alloc() throw();
      virtual const char* what() const throw();
    };
  }

DESCRIPTION

  bad_alloc() throw();

  This function constructs an object of class bad_alloc.

  bad_alloc(const bad_alloc&) throw();
  bad_alloc& operator=(const bad_alloc&) throw();

  These functions copy an object of class bad_alloc.

  virtual const char* what() const throw();

  what() returns a string providing information about the error.  The string
  returned by what() is implementation defined.

SEE ALSO

  new, exception, new_handler

STANDARDS CONFORMANCE

  ANSI X3J16/ISO WG21 Joint C++ Committee
About PDF files: The PDF files on this site can be read online or printed using Adobe® Acrobat® Reader. If you do not have this software on your system, you may download it from Adobe's website.
Privacy statement Using this site means you accept its terms C++ support
© 2008 Hewlett-Packard Development Company, L.P.