public inbox for gcc-help@gcc.gnu.org
 help / color / mirror / Atom feed
* RE: cout function and iostream.h
@ 2004-01-08 12:01 Wayne
  0 siblings, 0 replies; 3+ messages in thread
From: Wayne @ 2004-01-08 12:01 UTC (permalink / raw)
  To: gcc-help

This link will catch you up on C++ header notation
that is part of the ASNSI C++ standard (and differs
from C header notation and the way C++ did things
prior to the late 1998 issuance of the standard)

http://www.cplusplus.com/doc/ansi/hfiles.html

Here by the way is my rendition of the classic
"Hello World"

#include<iostream>
using namespace std;  //where the names are - like cout!

int main(void)
{
   cout << "This is what that putz Wayne said to do!\n";
   return 0;
}

Wayne

^ permalink raw reply	[flat|nested] 3+ messages in thread

* RE: cout function and iostream.h
  2004-01-08  9:20 abcd efgh
@ 2004-01-08  9:28 ` Robert McNulty Junior
  0 siblings, 0 replies; 3+ messages in thread
From: Robert McNulty Junior @ 2004-01-08  9:28 UTC (permalink / raw)
  To: abcd efgh, gcc-help

try #include <iostream> at the beginning.
I'll look into my streams and see what file is called.
You can't call .h files in C++ like that.
Robert

-----Original Message-----
From: gcc-help-owner@gcc.gnu.org [mailto:gcc-help-owner@gcc.gnu.org]On
Behalf Of abcd efgh
Sent: Thursday, January 08, 2004 3:21 AM
To: gcc-help@gcc.gnu.org
Subject: cout function and iostream.h


Hello,

I am trying to compile a simple "hello world" program:

#include "iostream.h"
int main()
{
  cout << "Hello\n";
}

with the command 

g++ -Wall hello.C -o hello

and I receive the following warning:

"This file includes at least one deprecated or
antiquated header. Please consider using one of the 32
headers found in section 17.4.1.2 of the C++ standard.
Examples include substituting the <X> header for the
<X.h> header for C++ includes, or <sstream> instead of
the deprecated header <strstream.h>. To disable this
warning use -Wno-deprecated."

An executable file is created but it doesn't run.

Is there a new header to obtain the cout function, or
was it replaced ?


Thanks in advance for any help,

Antonio Serra


__________________________________
Do you Yahoo!?
Yahoo! Hotjobs: Enter the "Signing Bonus" Sweepstakes
http://hotjobs.sweepstakes.yahoo.com/signingbonus


^ permalink raw reply	[flat|nested] 3+ messages in thread

* cout function and iostream.h
@ 2004-01-08  9:20 abcd efgh
  2004-01-08  9:28 ` Robert McNulty Junior
  0 siblings, 1 reply; 3+ messages in thread
From: abcd efgh @ 2004-01-08  9:20 UTC (permalink / raw)
  To: gcc-help

Hello,

I am trying to compile a simple "hello world" program:

#include "iostream.h"
int main()
{
  cout << "Hello\n";
}

with the command 

g++ -Wall hello.C -o hello

and I receive the following warning:

"This file includes at least one deprecated or
antiquated header. Please consider using one of the 32
headers found in section 17.4.1.2 of the C++ standard.
Examples include substituting the <X> header for the
<X.h> header for C++ includes, or <sstream> instead of
the deprecated header <strstream.h>. To disable this
warning use -Wno-deprecated."

An executable file is created but it doesn't run.

Is there a new header to obtain the cout function, or
was it replaced ?


Thanks in advance for any help,

Antonio Serra


__________________________________
Do you Yahoo!?
Yahoo! Hotjobs: Enter the "Signing Bonus" Sweepstakes
http://hotjobs.sweepstakes.yahoo.com/signingbonus

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2004-01-08 12:01 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2004-01-08 12:01 cout function and iostream.h Wayne
  -- strict thread matches above, loose matches on Subject: below --
2004-01-08  9:20 abcd efgh
2004-01-08  9:28 ` Robert McNulty Junior

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).