This is the mail archive of the cygwin@cygwin.com mailing list for the Cygwin project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: newbie seeking help


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]