Results 1 to 5 of 5

Thread: what is the use of iostream directive?

  1. #1
    Join Date
    Dec 2010
    Posts
    53

    what is the use of iostream directive?

    Hey I am student of information technology , I have got my exams coming this week, I was first trying for the engineering, but sadly could not get admission in it as I did not have enough marks in , but still I did not gave up and was counting on my hopes, but fortune did not favor me and I landed up in BSc(IT), I have learned the C language practicing it in Turbo C , but then I wanted to learn the object oriented language now , so there came the C++ language . I learned a few basic thing but but was not quite aware about the predecessor directives, iostream in particular, why it is being used for. Please post back your reply on this .

  2. #2
    Join Date
    May 2009
    Posts
    529

    Re: what is the use of iostream directive?

    Well as in the C language you were making the use of the printf command , but in C++ you do not make use of i , instead you use Cout for out put and Cin for input , but you will not be able to use it and in your program if you do not mention the iostream directive in the beginning of your program , in the name itself you will be able to guess as the name of the directive itself suggests that it is meant for the input and output operation. I think my post was helpful.

  3. #3
    Join Date
    May 2009
    Posts
    637

    Re: what is the use of iostream directive?

    A regular piece of recommendation is often given to novel C++ developers is to utilize <iostream> in the place of <iostream.h> or <fstream> in the place of <fstream.h>. This is frequently given with only the clarification that the .h forms are disapprove of without explanation what the distinction is and why, in actuality, using the extensionless edition is better.

  4. #4
    Join Date
    May 2009
    Posts
    527

    Re: what is the use of iostream directive?

    Preprocessor directives are main line built-in in the code of your programs that are not actual code something else than those they are actually the directives for the preprocessor. These lines are always headed by a hash symbol (#). The preprocessor is run before the actual compilation of code begins, therefore the preprocessor digests all these directives before any code is generated by the statements.

  5. #5
    Join Date
    Apr 2009
    Posts
    488

    Re: what is the use of iostream directive?

    These preprocessor directives expand only across a single line of program. As soon as a newline character is discovered, the preprocessor directive is taken to end and does not require any semicolon to terminate it like any normal statement is ended with a semicolon end. If you want a preprocessor directive extend through multiple lines then you can make the (\) at the end of any line .

Similar Threads

  1. A fatal error or timeout occurred while processing this directive
    By Xan Mathew in forum Networking & Security
    Replies: 5
    Last Post: 18-06-2010, 05:47 PM
  2. How to Use the #include Directive in ASP?
    By NIcaBoy in forum Software Development
    Replies: 5
    Last Post: 02-02-2010, 06:24 AM
  3. How can I use the pragma directive in C?
    By Tailor in forum Software Development
    Replies: 3
    Last Post: 21-01-2010, 08:39 AM
  4. Explain #define preprocessor directive
    By Javiier in forum Software Development
    Replies: 3
    Last Post: 14-11-2009, 10:12 PM
  5. Replies: 0
    Last Post: 04-06-2009, 10:49 AM

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Page generated in 1,714,105,279.06519 seconds with 17 queries