Return-Path: pg_adm@postgres.berkeley.edu
Received: by postgres.Berkeley.EDU (5.61/1.29)
	id AA12687; Thu, 15 Apr 93 16:58:27 -0700
Date: Thu, 15 Apr 93 16:58:27 -0700
Message-Id: <9304152358.AA12687@postgres.Berkeley.EDU>
From: lau@retina.CS.UCLA.EDU (Siu Wah Lau)
Subject: Using LIBPQ in C++ program
To: postgres@postgres.berkeley.edu
Sender: pg_adm@postgres.berkeley.edu


I have problem with compiling the following C++ program:

#include "tmp/libpq.h"

main(void)
{
	char * c = new char[20];
}

The compiler reports the following error when I compile the program:

try.cc: 5: new: argument mismatch
"try.cc", line 5: error: syntax error

The error is due to the fact that "new" is a macro defined in
"tmp/c.h" which is included by "tmp/libpq.h".
Hence the "new" operator in C++ cannot be used.

Do anyone know how to overcome this problem?

Thank you.

Clarence.
