C++Talk.NET Forum Index C++Talk.NET
C++ language newsgroups
 
Archives   FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

n00bie questions

 
Post new topic   Reply to topic    C++Talk.NET Forum Index -> C++ language (comp.lang.c++)
View previous topic :: View next topic  
Author Message
Se'noj
Guest





PostPosted: Wed Aug 25, 2004 10:13 am    Post subject: n00bie questions Reply with quote



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')
Back to top
Sharad Kala
Guest





PostPosted: Wed Aug 25, 2004 10:15 am    Post subject: Re: n00bie questions Reply with quote




"Se'noj" <tlhingan (AT) gmail (DOT) com> wrote

Quote:
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-lite/coding-standards.html#faq-27.4

-Sharad



Back to top
Ioannis Vranos
Guest





PostPosted: Wed Aug 25, 2004 11:30 am    Post subject: Re: n00bie questions Reply with quote



Se'noj wrote:
Quote:
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>.




Quote:

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

Back to top
K Campbell
Guest





PostPosted: Wed Aug 25, 2004 3:04 pm    Post subject: Re: n00bie questions Reply with quote

"Sharad Kala" <no__spam.sharadk_ind (AT) yahoo (DOT) com> wrote

Quote:
"Se'noj" <tlhingan (AT) gmail (DOT) com> wrote in message
news:39d43bd0.0408250213.71b9b22 (AT) posting (DOT) google.com...
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.

Back to top
Ali Cehreli
Guest





PostPosted: Wed Aug 25, 2004 5:12 pm    Post subject: Re: n00bie questions Reply with quote

On Wed, 25 Aug 2004 08:04:59 -0700, K Campbell wrote:

Quote:
"Sharad Kala" <no__spam.sharadk_ind (AT) yahoo (DOT) com> wrote in message
news:<2p375lFg1t6eU1 (AT) uni-berlin (DOT) de>...
"Se'noj" <tlhingan (AT) gmail (DOT) com> wrote in message
news:39d43bd0.0408250213.71b9b22 (AT) posting (DOT) google.com...
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.

Quote:
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.

Quote:
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

Back to top
Karthik Kumar
Guest





PostPosted: Sat Aug 28, 2004 6:15 am    Post subject: Re: n00bie questions Reply with quote

Se'noj wrote:

Quote:
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.

Quote:

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.

Back to top
Display posts from previous:   
Post new topic   Reply to topic    C++Talk.NET Forum Index -> C++ language (comp.lang.c++) All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2006 phpBB Group
SEO toolkit © 2004-2006 webmedic.