From owner-freebsd-questions@FreeBSD.ORG Thu Aug 26 02:46:27 2004 Return-Path: Delivered-To: freebsd-questions@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 9DC9816A4D1 for ; Thu, 26 Aug 2004 02:46:27 +0000 (GMT) Received: from ylpvm01.prodigy.net (ylpvm01-ext.prodigy.net [207.115.57.32]) by mx1.FreeBSD.org (Postfix) with ESMTP id 5897543D39 for ; Thu, 26 Aug 2004 02:46:27 +0000 (GMT) (envelope-from kris@obsecurity.org) Received: from obsecurity.dyndns.org (adsl-67-115-74-195.dsl.lsan03.pacbell.net [67.115.74.195]) i7Q2kQCY008167; Wed, 25 Aug 2004 22:46:26 -0400 Received: by obsecurity.dyndns.org (Postfix, from userid 1000) id 347DD51381; Wed, 25 Aug 2004 19:46:26 -0700 (PDT) Date: Wed, 25 Aug 2004 19:46:26 -0700 From: Kris Kennaway To: David Syphers Message-ID: <20040826024626.GA25115@xor.obsecurity.org> References: <200408251940.07032.dsyphers@u.washington.edu> Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="OgqxwSJOaUobr8KG" Content-Disposition: inline In-Reply-To: <200408251940.07032.dsyphers@u.washington.edu> User-Agent: Mutt/1.4.2.1i cc: freebsd-questions@freebsd.org Subject: Re: help with 'hello world' X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 26 Aug 2004 02:46:27 -0000 --OgqxwSJOaUobr8KG Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Wed, Aug 25, 2004 at 07:40:07PM -0700, David Syphers wrote: > It's been a while since I wrote anything in C++, but this is sad - I can'= t get=20 > hello world to compile. Could some kind person please tell me what, exact= ly,=20 > is wrong with: >=20 > #include >=20 > int main() > { > cout << "Hello World"; > return 0; > } >=20 > This compiles fine on SunOS using egcs-2.91.66. However, it fails on Free= BSD=20 > (gcc 3.4.2) and RedHat (gcc 3.2.3) with the bizarre error "`cout'=20 > undeclared". How are you compiling it? At a guess, it sounds like you're using the C compiler (gcc) not the C++ compiler (g++). Kris --OgqxwSJOaUobr8KG Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.2.5 (FreeBSD) iD8DBQFBLU8BWry0BWjoQKURAvPeAKCaIDDjUUUMDbrrPc9a7AqnVAM0zgCglEIn RDiv3thTWsOyqpw9J/PhzcI= =GB7R -----END PGP SIGNATURE----- --OgqxwSJOaUobr8KG--