| delorie.com/archives/browse.cgi | search |
| Mailing-List: | contact cygwin-help AT sourceware DOT cygnus DOT com; run by ezmlm |
| List-Subscribe: | <mailto:cygwin-subscribe AT sources DOT redhat DOT com> |
| List-Archive: | <http://sources.redhat.com/ml/cygwin/> |
| List-Post: | <mailto:cygwin AT sources DOT redhat DOT com> |
| List-Help: | <mailto:cygwin-help AT sources DOT redhat DOT com>, <http://sources.redhat.com/ml/#faqs> |
| Sender: | cygwin-owner AT sources DOT redhat DOT com |
| Delivered-To: | mailing list cygwin AT sources DOT redhat DOT com |
| Message-ID: | <3AAFBB2F.9000904@earthlink.net> |
| Date: | Wed, 14 Mar 2001 12:40:47 -0600 |
| From: | Jonathon Merz <jmerz42 AT earthlink DOT net> |
| Reply-To: | jmerz42 AT earthlink DOT net |
| User-Agent: | Mozilla/5.0 (Windows; U; WinNT4.0; en-US; 0.8) Gecko/20010215 |
| X-Accept-Language: | en,pdf |
| MIME-Version: | 1.0 |
| To: | cygwin AT cygwin DOT com |
| Subject: | Re: newbie seeking help |
| References: | <LAW2-F42vLVKi3s1wsX0000c370 AT hotmail DOT com> |
Jessica Wang wrote:
> Hi,
>
> I'm very new at programming. I'm trying to compile a C++
> program using Cygwin g++ on Windows NT. The program is:
>
> #include <iostream.h>
> int main()
> {
> cout <( "Hello World" << endl;
> return 0;
> }
>
>
> I'm getting the following error:
>
>
> $ g++ hello.C -o hello
> hello.C: In function `int main()':
> hello.C:20: invalid operands `const char[12]' and `ostream & ()(ostream
> &)' to binary `operator <<'
> hello.C:20: parse error before `;'
>
Looks like just a typo:
change
cout <( "Hello World" << endl;
to:
cout << "Hello World" << endl;
^
|
--
-------------------------------------
If you had a million Shakespeares,
could they write like a monkey?
--
Want to unsubscribe from this list?
Check out: http://cygwin.com/ml/#unsubscribe-simple
| webmaster | delorie software privacy |
| Copyright © 2019 by DJ Delorie | Updated Jul 2019 |