Thread: stdio.h cstdio.h

  1. #1
    Registered User
    Join Date
    Dec 2007
    Posts
    84

    stdio.h cstdio.h

    Hiiiii guys,

    What is the difference between stdio.h and cstdio.h ??

    Thank you!

  2. #2
    Jack of many languages Dino's Avatar
    Join Date
    Nov 2007
    Location
    Chappell Hill, Texas
    Posts
    2,332
    It's my understanding that stdio.h is a C language include header file, and you would code it as:

    Code:
    #include <stdio.h>
    And cstdio.h would be the same (or an equivalent) header file that you would include if you were coding in C++, like this:
    Code:
    #include <cstdio>
    Note that in C++, you would not use the .h.

    Todd

  3. #3
    Code Goddess Prelude's Avatar
    Join Date
    Sep 2001
    Posts
    9,897
    >What is the difference between stdio.h and cstdio.h ??
    That's easy, there's no such thing as cstdio.h. But you probably meant cstdio, so the real answer is that cstdio is for C++ only and places all of the names from stdio.h in the std namespace. Aside from that, the two headers are functionally identical.
    My best code is written with the delete key.

  4. #4
    Registered User
    Join Date
    Dec 2007
    Posts
    84

    Thumbs up

    Cheers!!

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. stdio.h or cstdio.h ?
    By salvadoravi in forum C Programming
    Replies: 2
    Last Post: 01-11-2008, 10:24 AM
  2. error: stdio.h: No such file or directory
    By MindLess in forum C Programming
    Replies: 9
    Last Post: 12-20-2007, 08:11 AM
  3. stdio.h
    By Vertex34 in forum C Programming
    Replies: 2
    Last Post: 07-12-2004, 10:18 AM
  4. error in -stdio.h __VALIST
    By JaWiB in forum C++ Programming
    Replies: 3
    Last Post: 09-20-2003, 12:22 PM
  5. Modifying stdio.h
    By Spectrum48k in forum C Programming
    Replies: 10
    Last Post: 05-29-2002, 08:30 AM