Thread: I have a few questions about c headers

  1. #1
    Registered User
    Join Date
    Jan 2017
    Posts
    6

    Exclamation I have a few questions about c headers

    Dear Forum Users,

    Kindly be informed that I use #include<stdio.h> and #include<conio.h> are these correct? should I use them both in my program? In this cprogramming website I watch that they use #include<iostream> which should I use?

    I use borelandc++ and sometimes turboc with blue screen/

    kindly guide me.

    With regards,
    Soumya

  2. #2
    and the hat of int overfl Salem's Avatar
    Join Date
    Aug 2001
    Location
    The edge of the known universe
    Posts
    39,661
    #include <stdio.h>
    This is the standard include file for conducting basic input/output within a C program.

    conio.h is an obsolete header file, used by obsolete compilers for obsolete operating systems.

    #include <iostream>
    This is the standard include file for conducting basic input/output within a C++ program.
    Note that this used to be called <iostream.h> before the C++ language was standardised. If your compiler doesn't support <iostream>, it is obsolete.

    I don't know how up to date your version of borelandc++ is, but you should definitely stop using your dos-like blue-screen turboc (it's obsolete).
    If you dance barefoot on the broken glass of undefined behaviour, you've got to expect the occasional cut.
    If at first you don't succeed, try writing your phone number on the exam paper.

  3. #3
    Registered User rstanley's Avatar
    Join Date
    Jun 2014
    Location
    New York, NY
    Posts
    1,113
    Quote Originally Posted by Salem View Post
    conio.h is an obsolete header file, used by obsolete compilers for obsolete operating systems.
    Glad I wasn't drinking my coffee when I read that! ;^)

  4. #4
    Registered User
    Join Date
    Jan 2017
    Posts
    6
    Hi Salem, thanks for your answer. In many engineering colleges in India still prefers turboc blue screen to to teach cprogramming. Do cprogrammers always use borlandc++ and code blocks? Should I always use <iosream> as my header file?

  5. #5
    and the hat of int overfl Salem's Avatar
    Join Date
    Aug 2001
    Location
    The edge of the known universe
    Posts
    39,661
    Ask your tutor how learning 25+ year old technology prepares you for a career in the 21st century.
    If you dance barefoot on the broken glass of undefined behaviour, you've got to expect the occasional cut.
    If at first you don't succeed, try writing your phone number on the exam paper.

  6. #6
    Registered User
    Join Date
    Jan 2017
    Posts
    6
    Thanks Salem, What compiler you use to write programs in C?

  7. #7
    and the hat of int overfl Salem's Avatar
    Join Date
    Aug 2001
    Location
    The edge of the known universe
    Posts
    39,661
    At the moment, I'm using GCC as the compiler suite and code::blocks as the IDE
    If you dance barefoot on the broken glass of undefined behaviour, you've got to expect the occasional cut.
    If at first you don't succeed, try writing your phone number on the exam paper.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Replies: 9
    Last Post: 03-07-2014, 09:36 PM
  2. Questions about a mass amount of headers
    By kiros88 in forum C Programming
    Replies: 6
    Last Post: 10-07-2010, 04:42 AM
  3. How to : Using C and C++ headers
    By toutarrive in forum C++ Programming
    Replies: 7
    Last Post: 11-20-2007, 12:38 PM
  4. including headers inside headers
    By kromozom in forum C++ Programming
    Replies: 5
    Last Post: 04-18-2005, 10:56 AM
  5. ip headers
    By skacy in forum C++ Programming
    Replies: 0
    Last Post: 04-10-2002, 01:44 PM

Tags for this Thread