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 

#include<iostream> doesnt work in VC++ compiler

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





PostPosted: Sun Nov 27, 2005 8:29 pm    Post subject: #include<iostream> doesnt work in VC++ compiler Reply with quote



I tried to use #include<iostream> in visual C++ compiler but then it
didnt work but i see this is the way it is being mentioned in C++
primer by lippman and lajoie.. where is the problem..
Do reply please.

Back to top
Mike Wahler
Guest





PostPosted: Sun Nov 27, 2005 8:32 pm    Post subject: Re: #include<iostream> doesnt work in VC++ compiler Reply with quote




"nichas" <sachin.gadkar (AT) gmail (DOT) com> wrote

Quote:
I tried to use #include<iostream> in visual C++ compiler but then it
didnt work

Define "didnt work." It works for me just fine.

Quote:
but i see this is the way it is being mentioned in C++
primer by lippman and lajoie..

That's because that's the valid name for that header.

Quote:
where is the problem..

Probably that you aren't reading *everything* in your book.

I'll take a guess at what's causing your problem and
tell you to look up 'std' and 'namespace'.

-Mike



Back to top
peter steiner
Guest





PostPosted: Sun Nov 27, 2005 8:32 pm    Post subject: Re: #include<iostream> doesnt work in VC++ compiler Reply with quote




nichas wrote:
Quote:
I tried to use #include<iostream> in visual C++ compiler but then it
didnt work but i see this is the way it is being mentioned in C++
primer by lippman and lajoie.. where is the problem..
Do reply please.

try:

#include <iostream>

notice the space between #include and <iostream>

-- peter


Back to top
Dan Cernat
Guest





PostPosted: Sun Nov 27, 2005 8:34 pm    Post subject: Re: #include<iostream> doesnt work in VC++ compiler Reply with quote


"nichas" <sachin.gadkar (AT) gmail (DOT) com> wrote

Quote:
I tried to use #include<iostream> in visual C++ compiler but then it
didnt work but i see this is the way it is being mentioned in C++
primer by lippman and lajoie.. where is the problem..
Do reply please.


The problem is on the line 42 of your code.
Learn how to post.



Back to top
Mike Wahler
Guest





PostPosted: Sun Nov 27, 2005 9:03 pm    Post subject: Re: #include<iostream> doesnt work in VC++ compiler Reply with quote


"peter steiner" <pnsteiner (AT) gmail (DOT) com> wrote

Quote:

nichas wrote:
I tried to use #include<iostream> in visual C++ compiler but then it
didnt work but i see this is the way it is being mentioned in C++
primer by lippman and lajoie.. where is the problem..
Do reply please.

try:

#include
notice the space between #include and

The space is not required (however I do use one because
I find it more readable).

-Mike



Back to top
Thomas Tutone
Guest





PostPosted: Sun Nov 27, 2005 9:40 pm    Post subject: Re: #include<iostream> doesnt work in VC++ compiler Reply with quote

nichas wrote:
Quote:
I tried to use #include<iostream> in visual C++ compiler but then it
didnt work but i see this is the way it is being mentioned in C++
primer by lippman and lajoie.. where is the problem..
Do reply please.

Copy and past (DON'T RETYPE) the following program, then please report
back on what it tells you after you compile and execute it:

#include <iostream>

int main()
{
std::cout << "It turns out }

Best regards,

Tom


Back to top
Kyle
Guest





PostPosted: Sun Nov 27, 2005 9:51 pm    Post subject: Re: #include<iostream> doesnt work in VC++ compiler Reply with quote

[snip]
Quote:
#include <iostream

int main()
{
std::cout << "It turns out }

almost ... std::endl is in include each other it may work sometimes (ok ok, it works on every
compiler i am aware of, but still ...)

Back to top
John Harrison
Guest





PostPosted: Sun Nov 27, 2005 10:40 pm    Post subject: Re: #include<iostream> doesnt work in VC++ compiler Reply with quote

nichas wrote:
Quote:
I tried to use #include<iostream> in visual C++ compiler but then it
didnt work but i see this is the way it is being mentioned in C++
primer by lippman and lajoie.. where is the problem..
Do reply please.


It does work. You're doing something wrong. Please post the code you say
doesn't work, say why you think it doesn't work, and specify which
version of Visual C++ you are using.

John

Back to top
Karl Heinz Buchegger
Guest





PostPosted: Mon Nov 28, 2005 9:57 am    Post subject: Re: #include<iostream> doesnt work in VC++ compiler Reply with quote

John Harrison wrote:
Quote:

nichas wrote:
I tried to use #include<iostream> in visual C++ compiler but then it
didnt work but i see this is the way it is being mentioned in C++
primer by lippman and lajoie.. where is the problem..
Do reply please.


It does work. You're doing something wrong. Please post the code you say
doesn't work, say why you think it doesn't work, and specify which
version of Visual C++ you are using.

and most important: tell us the error message from your compiler.
Usually the first 2 or 3 messages are sufficient.


--
Karl Heinz Buchegger
[email]kbuchegg (AT) gascad (DOT) at[/email]

Back to top
nichas
Guest





PostPosted: Mon Nov 28, 2005 10:33 am    Post subject: Re: #include<iostream> doesnt work in VC++ compiler Reply with quote

Thomas, it worked fine.. I think that the problem lies in me.. i did
complete a intermediate level course in C++ about 2years back and
things have faded away.. so i got to get through them and then only
post any doubts not leading to waste of ur time.. i will surely find
the difference in code given by you and the code which gave me the
error and i do appologize i should have provide the group with the code
and the error that emanated.. thanks again all of you and thomas you
too..

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.