By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
446,407 Members | 920 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 446,407 IT Pros & Developers. It's quick & easy.

n00bie questions

P: n/a
Hi everyone. This is my first post to Usenet, AND I started learning
to program C++ last weekend, so please bear with me. Two questions...

Firstly, whenever I compile programs, my compiler (Bloodshed Dev-CPP)
tells me that iostream.h is deprecated or antiquated. What exactly
does that mean, and how do I fix it?

Second, some online tutorials I've seen use std:: at the start of some
line, but forget to explain what it means. Could anyone help me out
with that?

Thanks for your help.
Bryan Jones
(aka Se'noj, tlhIngan Hol jatlhwI')
Jul 22 '05 #1
Share this Question
Share on Google+
5 Replies


P: n/a

"Se'noj" <tl******@gmail.com> wrote in message
news:39*************************@posting.google.co m...
Hi everyone. This is my first post to Usenet, AND I started learning
to program C++ last weekend, so please bear with me. Two questions...

Firstly, whenever I compile programs, my compiler (Bloodshed Dev-CPP)
tells me that iostream.h is deprecated or antiquated. What exactly
does that mean, and how do I fix it?

Second, some online tutorials I've seen use std:: at the start of some
line, but forget to explain what it means. Could anyone help me out
with that?


You may want to check this FAQ (and others too) -
http://www.parashift.com/c++-faq-lit....html#faq-27.4

-Sharad
Jul 22 '05 #2

P: n/a
Se'noj wrote:
Hi everyone. This is my first post to Usenet, AND I started learning
to program C++ last weekend, so please bear with me. Two questions...

Firstly, whenever I compile programs, my compiler (Bloodshed Dev-CPP)
tells me that iostream.h is deprecated or antiquated. What exactly
does that mean, and how do I fix it?

That means that you must get another C++ book. C++ is a standardised
language, and iostream.h was used before the official standard.
The C++ standard iostream header is <iostream> and *not* <iostream.h>.


Second, some online tutorials I've seen use std:: at the start of some
line, but forget to explain what it means. Could anyone help me out
with that?

In general, everything in the C++ standard library (except of the
C-subset .h header files) is defined in namespace std.


Regards,

Ioannis Vranos

http://www23.brinkster.com/noicys
Jul 22 '05 #3

P: n/a
"Sharad Kala" <no******************@yahoo.com> wrote in message news:<2p************@uni-berlin.de>...
"Se'noj" <tl******@gmail.com> wrote in message
news:39*************************@posting.google.co m...
Hi everyone. This is my first post to Usenet, AND I started learning
to program C++ last weekend, so please bear with me. Two questions...

Firstly, whenever I compile programs, my compiler (Bloodshed Dev-CPP)
tells me that iostream.h is deprecated or antiquated. What exactly
does that mean, and how do I fix it?

Second, some online tutorials I've seen use std:: at the start of some
line, but forget to explain what it means. Could anyone help me out
with that?


First, try doing #include <iostream>

Second, std:: is part of something called a namespace. Namespaces are
generally used in larger programs so that someone doesn't declare the
same variable twice.
using namespace std; means that use all the variables in the namespace
std
an example namespace is:

namespace one
{
int j;
string k;
}
int main ()
{
one::j = 2;
using namespace one;
k = "Hello";
}

cout is actually a variable declared under the namespace std;
you can either do:
std::cout<<"Hello, World";
or
using namespace std;
cout<<"Hello, World";

I hope I've been of some help.
Jul 22 '05 #4

P: n/a
On Wed, 25 Aug 2004 08:04:59 -0700, K Campbell wrote:
"Sharad Kala" <no******************@yahoo.com> wrote in message
news:<2p************@uni-berlin.de>...
"Se'noj" <tl******@gmail.com> wrote in message
news:39*************************@posting.google.co m...
> Second, some online tutorials I've seen use std:: at the start of
> some line, but forget to explain what it means. Could anyone help me
> out with that?
Second, std:: is part of something called a namespace.
std is the name of the standard namespace. :: is the scope resolution operator.
Namespaces are
generally used in larger programs so that someone doesn't declare the
same variable twice.
Not only the variables but the names in general.
using namespace std; means that use all the variables in the namespace
std


It means that the compiler should look into the specified namespace when it comes accross an unqualified name.

Ali
Jul 22 '05 #5

P: n/a
Se'noj wrote:
Hi everyone. This is my first post to Usenet, AND I started learning
to program C++ last weekend, so please bear with me. Two questions...

Firstly, whenever I compile programs, my compiler (Bloodshed Dev-CPP)
tells me that iostream.h is deprecated or antiquated. What exactly
does that mean, and how do I fix it?
#include <iostream>
should fix it.

Probably you need to check the source from which you are learning
C++. Either the book that you are learning from could be deprecated .
"C++ Programming Language" - Stroustroup is suggested by one and all.

Second, some online tutorials I've seen use std:: at the start of some
line, but forget to explain what it means. Could anyone help me out
with that?


Check out for namespaces further in that tutorials.

All the best.

--
Karthik.
Jul 22 '05 #6

This discussion thread is closed

Replies have been disabled for this discussion.