|
From: Titi A. <tia...@ya...> - 2006-02-11 04:40:31
|
Hi all,
I just tried dev-cpp 4.9.9.2 today and began with
----------------
#include <iostream.h>
#include <conio.h>
main()
{
cout <<"Hello word";
getch();
}
-----------------
the code wasn't compiled and I got following message "
#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.
..."
But, when I used stdio.h and replaced cout with printf
the code compiled and the result shown.
Can someone explaine why I couldn't use iostream
header ?
Thanks
Titi
__________________________________________________
Do You Yahoo!?
Tired of spam? Yahoo! Mail has the best spam protection around
http://mail.yahoo.com
|
|
From: Eric E. <eri...@sb...> - 2006-02-11 05:50:56
|
Try this:
#include <iostream.h>
#include <stdlib.h>
int main()
{
cout <<"Hello word" << endl;
system("PAUSE");
return 0;
}
-----Original Message-----
From: dev...@li...
[mailto:dev...@li...] On Behalf Of Titi =
Anggono
Sent: Friday, February 10, 2006 10:40 PM
To: dev...@li...
Subject: [Dev-C++] help with cout
Hi all,
I just tried dev-cpp 4.9.9.2 today and began with=20
----------------
#include <iostream.h>
#include <conio.h>
main()
{
cout <<"Hello word";
getch();
}
-----------------
the code wasn't compiled and I got following message "
#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.
..."
But, when I used stdio.h and replaced cout with printf
the code compiled and the result shown.=20
Can someone explaine why I couldn't use iostream
header ?
Thanks
Titi
__________________________________________________
Do You Yahoo!?
Tired of spam? Yahoo! Mail has the best spam protection around=20
http://mail.yahoo.com=20
-------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc. Do you grep through log =
files
for problems? Stop! Download the new AJAX search engine that makes
searching your log files as easy as surfing the web. DOWNLOAD SPLUNK!
http://sel.as-us.falkag.net/sel?cmd=3Dlnk&kid=3D103432&bid=3D230486&dat=3D=
121642
_______________________________________________
Dev-cpp-users mailing list
Dev...@li...
TO UNSUBSCRIBE: http://www23.brinkster.com/noicys/devcpp/ub.htm
https://lists.sourceforge.net/lists/listinfo/dev-cpp-users
|
|
From: Rohit V. B. <rv...@gm...> - 2006-02-11 06:08:52
|
Eric Edwards wrote:
> Try this:
> #include <iostream.h>
> #include <stdlib.h>
try just <iostream> and <stdlib>
and "using namespace std;"
> int main()
> {
> cout <<"Hello word" << endl;
> system("PAUSE");
> return 0;
> }
--
Rohit V. Bhute
http://rvbhute.freelinuxhost.com/wordpress
|
|
From: Per W. <pw...@ia...> - 2006-02-11 12:45:34
|
You could use the iostream.h. Note that the cited message was a warning,
not an error, and it explicitly said that the header you used was
deprecated, i.e. not recommended for use anymore.
The file conio.h on the other hand is a non-standard file, i.e. a file
that have only existed on some platforms (normally old MS-DOS compilers).
Since most compilers does not have this file, it shouldn't - and in most
cases can't - be used.
/Per W
On Fri, 10 Feb 2006, Titi Anggono wrote:
> Hi all,
>
> I just tried dev-cpp 4.9.9.2 today and began with
> ----------------
> #include <iostream.h>
> #include <conio.h>
> main()
> {
> cout <<"Hello word";
> getch();
> }
> -----------------
> the code wasn't compiled and I got following message "
> #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.
> ..."
>
> But, when I used stdio.h and replaced cout with printf
> the code compiled and the result shown.
> Can someone explaine why I couldn't use iostream
> header ?
>
> Thanks
> Titi
>
>
> __________________________________________________
> Do You Yahoo!?
> Tired of spam? Yahoo! Mail has the best spam protection around
> http://mail.yahoo.com
>
>
> -------------------------------------------------------
> This SF.net email is sponsored by: Splunk Inc. Do you grep through log files
> for problems? Stop! Download the new AJAX search engine that makes
> searching your log files as easy as surfing the web. DOWNLOAD SPLUNK!
> http://sel.as-us.falkag.net/sel?cmd=lnk&kid=103432&bid=230486&dat=121642
> _______________________________________________
> Dev-cpp-users mailing list
> Dev...@li...
> TO UNSUBSCRIBE: http://www23.brinkster.com/noicys/devcpp/ub.htm
> https://lists.sourceforge.net/lists/listinfo/dev-cpp-users
>
|
|
From: lordSauron <lor...@gm...> - 2006-02-13 00:09:49
|
On 2/11/06, Per Westermark <pw...@ia...> wrote:
> You could use the iostream.h. Note that the cited message was a warning,
> not an error, and it explicitly said that the header you used was
> deprecated, i.e. not recommended for use anymore.
I just take that as a "don't use it - it's going to disappear soon!"
There was nothing *wrong* with your original code, save for the
#include -s and the lack of a using namespace std; Without namespace
std; - correct me if I'm wrong - you'd need to do iostream::cout
instead of a shorter cout call.
So, you could forgo the using namespace std;, however, you would need
to use iostream::cout and iostream::cin whenever trying to use
something found in the iostream include.
Also, to use system("pause"); you would need to include cstdlib (or
cstdlib.h, take your pick). If you didn't use using namespace std;
you would also need to use cstdlib::system("pause"); to make that
system call. Also note that system("pause"); is only valid on MS DOS
machines, since the pause command is not found in other shells like
bash.
That's my $0.02.
> The file conio.h on the other hand is a non-standard file, i.e. a file
> that have only existed on some platforms (normally old MS-DOS compilers).
> Since most compilers does not have this file, it shouldn't - and in most
> cases can't - be used.
>
> /Per W
>
> On Fri, 10 Feb 2006, Titi Anggono wrote:
>
> > Hi all,
> >
> > I just tried dev-cpp 4.9.9.2 today and began with
> > ----------------
> > #include <iostream.h>
> > #include <conio.h>
> > main()
> > {
> > cout <<"Hello word";
> > getch();
> > }
> > -----------------
> > the code wasn't compiled and I got following message "
> > #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.
> > ..."
> >
> > But, when I used stdio.h and replaced cout with printf
> > the code compiled and the result shown.
> > Can someone explaine why I couldn't use iostream
> > header ?
> >
> > Thanks
> > Titi
> >
> >
> > __________________________________________________
> > Do You Yahoo!?
> > Tired of spam? Yahoo! Mail has the best spam protection around
> > http://mail.yahoo.com
> >
> >
> > -------------------------------------------------------
> > This SF.net email is sponsored by: Splunk Inc. Do you grep through log =
files
> > for problems? Stop! Download the new AJAX search engine that makes
> > searching your log files as easy as surfing the web. DOWNLOAD SPLUNK!
> > http://sel.as-us.falkag.net/sel?cmd=3Dlnk&kid=3D103432&bid=3D230486&dat=
=3D121642
> > _______________________________________________
> > Dev-cpp-users mailing list
> > Dev...@li...
> > TO UNSUBSCRIBE: http://www23.brinkster.com/noicys/devcpp/ub.htm
> > https://lists.sourceforge.net/lists/listinfo/dev-cpp-users
> >
>
>
>
> -------------------------------------------------------
> This SF.net email is sponsored by: Splunk Inc. Do you grep through log fi=
les
> for problems? Stop! Download the new AJAX search engine that makes
> searching your log files as easy as surfing the web. DOWNLOAD SPLUNK!
> http://sel.as-us.falkag.net/sel?cmd=3Dlnk&kid=3D103432&bid=3D230486&dat=
=3D121642
> _______________________________________________
> Dev-cpp-users mailing list
> Dev...@li...
> TO UNSUBSCRIBE: http://www23.brinkster.com/noicys/devcpp/ub.htm
> https://lists.sourceforge.net/lists/listinfo/dev-cpp-users
>
--
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D GCv3.12 =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
GCS d-(++) s+: a? C++ UL+>++++ P+
L++ E--- W+(+++) N++ o? K? w--- O? M+
V? PS- PE+ Y-(--) PGP- t+++ 5? X R tv-- b+
DI+++ D+ G e* h- !r !y
=3D=3D=3D=3D=3D=3D=3D=3D=3D END GCv3.12 =3D=3D=3D=3D=3D=3D=3D=3D
|
|
From: Per W. <pw...@ia...> - 2006-02-13 00:20:50
|
It is only the new include files that have their symbols in the std::
namespace. With the older include files, no std:: is needed, since there
was no namespace keyword in the original C++ standard.
/Per W
On Sun, 12 Feb 2006, lordSauron wrote:
> On 2/11/06, Per Westermark <pw...@ia...> wrote:
> > You could use the iostream.h. Note that the cited message was a warning,
> > not an error, and it explicitly said that the header you used was
> > deprecated, i.e. not recommended for use anymore.
>
> I just take that as a "don't use it - it's going to disappear soon!"
>
> There was nothing *wrong* with your original code, save for the
> #include -s and the lack of a using namespace std; Without namespace
> std; - correct me if I'm wrong - you'd need to do iostream::cout
> instead of a shorter cout call.
>
> So, you could forgo the using namespace std;, however, you would need
> to use iostream::cout and iostream::cin whenever trying to use
> something found in the iostream include.
>
> Also, to use system("pause"); you would need to include cstdlib (or
> cstdlib.h, take your pick). If you didn't use using namespace std;
> you would also need to use cstdlib::system("pause"); to make that
> system call. Also note that system("pause"); is only valid on MS DOS
> machines, since the pause command is not found in other shells like
> bash.
>
> That's my $0.02.
>
> > The file conio.h on the other hand is a non-standard file, i.e. a file
> > that have only existed on some platforms (normally old MS-DOS compilers).
> > Since most compilers does not have this file, it shouldn't - and in most
> > cases can't - be used.
> >
> > /Per W
> >
> > On Fri, 10 Feb 2006, Titi Anggono wrote:
> >
> > > Hi all,
> > >
> > > I just tried dev-cpp 4.9.9.2 today and began with
> > > ----------------
> > > #include <iostream.h>
> > > #include <conio.h>
> > > main()
> > > {
> > > cout <<"Hello word";
> > > getch();
> > > }
> > > -----------------
> > > the code wasn't compiled and I got following message "
> > > #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.
> > > ..."
> > >
> > > But, when I used stdio.h and replaced cout with printf
> > > the code compiled and the result shown.
> > > Can someone explaine why I couldn't use iostream
> > > header ?
> > >
> > > Thanks
> > > Titi
|
|
From: lordSauron <lor...@gm...> - 2006-02-13 01:30:04
|
On 2/12/06, Per Westermark <pw...@ia...> wrote:
> It is only the new include files that have their symbols in the std::
> namespace. With the older include files, no std:: is needed, since there
> was no namespace keyword in the original C++ standard.
Oh. I didn't reallize that. Thanks.
--
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D GCv3.12 =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
GCS d-(++) s+: a? C++ UL+>++++ P+
L++ E--- W+(+++) N++ o? K? w--- O? M+
V? PS- PE+ Y-(--) PGP- t+++ 5? X R tv-- b+
DI+++ D+ G e* h- !r !y
=3D=3D=3D=3D=3D=3D=3D=3D=3D END GCv3.12 =3D=3D=3D=3D=3D=3D=3D=3D
|