This is the mail archive of the
libstdc++@gcc.gnu.org
mailing list for the libstdc++ project.
Re: namespace std::
- From: Jonathan Wakely <cow at compsoc dot man dot ac dot uk>
- To: Dhruv Matani <dhruvbird at gmx dot net>
- Cc: libstdc++ <libstdc++ at gcc dot gnu dot org>
- Date: Wed, 4 Aug 2004 15:39:24 +0100
- Subject: Re: namespace std::
- References: <1091630199.4809.1.camel@localhost.localdomain>
On Wed, Aug 04, 2004 at 08:06:39PM +0530, Dhruv Matani wrote:
> Hello,
> I wanted to know whether:
> 1. By including cstdlib I should get access to malloc() and free().
> 2. Should malloc() and free() be in namespace std::?
Yes and yes.
i.e. this should compile fine (and does with GCC)
#include <cstdlib>
int main()
{
std::free(std::malloc(1));
}