Date: Wed, 25 Aug 2004 19:46:26 -0700 From: Kris Kennaway <kris@obsecurity.org> To: David Syphers <dsyphers@u.washington.edu> Cc: freebsd-questions@freebsd.org Subject: Re: help with 'hello world' Message-ID: <20040826024626.GA25115@xor.obsecurity.org> In-Reply-To: <200408251940.07032.dsyphers@u.washington.edu> References: <200408251940.07032.dsyphers@u.washington.edu>
next in thread | previous in thread | raw e-mail | index | archive | help
[-- Attachment #1 --]
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
> hello world to compile. Could some kind person please tell me what, exactly,
> is wrong with:
>
> #include <iostream>
>
> int main()
> {
> cout << "Hello World";
> return 0;
> }
>
> This compiles fine on SunOS using egcs-2.91.66. However, it fails on FreeBSD
> (gcc 3.4.2) and RedHat (gcc 3.2.3) with the bizarre error "`cout'
> 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
[-- Attachment #2 --]
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.5 (FreeBSD)
iD8DBQFBLU8BWry0BWjoQKURAvPeAKCaIDDjUUUMDbrrPc9a7AqnVAM0zgCglEIn
RDiv3thTWsOyqpw9J/PhzcI=
=GB7R
-----END PGP SIGNATURE-----
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20040826024626.GA25115>
