Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > C++ > Difference and Histroy about inluding of header without h

Reply
Thread Tools

Difference and Histroy about inluding of header without h

 
 
Rainer Heynke
Guest
Posts: n/a
 
      09-11-2008
Hi,

a friend of mine ask about the reason and the history beyond the two
different ways to include std-headers like

#include "stdio.h"
#include <cstdio>


He's no using the usenet, but he read the answers via google.




Rainer
 
Reply With Quote
 
 
 
 
Default User
Guest
Posts: n/a
 
      09-11-2008
Rainer Heynke wrote:


>
> He's no using the usenet, but he read the answers via google.


Google Groups allows one to post as well as read.




Brian
 
Reply With Quote
 
 
 
 
James Kanze
Guest
Posts: n/a
 
      09-12-2008
On Sep 12, 9:27 am, blargg....@gishpuppy.com (blargg) wrote:
> In article <gac1i1$hq...@aioe.org>, Rainer Heynke
> <nore...@plucked.de> wrote:


> > a friend of mine ask about the reason and the history beyond
> > the two different ways to include std-headers like


> > #include "stdio.h"
> > #include <cstdio>


> Before C++ became an ISO standard, there were already many C++
> headers like iostream.h and similar, whose functionality
> differed from one compiler to another.


Actually, the functionality differed less than the names. Some
compilers had <iostream.h>, <strstream.h>, etc.; others
<iostream.hpp>, <strstrea.hpp>, etc.; and who knows what else.

--
James Kanze (GABI Software) email:
Conseils en informatique orientée objet/
Beratung in objektorientierter Datenverarbeitung
9 place Sémard, 78210 St.-Cyr-l'École, France, +33 (0)1 30 23 00 34
 
Reply With Quote
 
James Kanze
Guest
Posts: n/a
 
      09-12-2008
On Sep 11, 11:27 pm, Victor Bazarov <v.Abaza...@comAcast.net> wrote:
> Rainer Heynke wrote:
> > a friend of mine ask about the reason and the history beyond
> > the two different ways to include std-headers like


> > #include "stdio.h"
> > #include <cstdio>


> > He's no using the usenet, but he read the answers via
> > google.


> Standard headers are never included with quotes, always with
> angle brackets. So, you shouldn't at all see


> #include "stdio.h"


> but always


> #include <stdio.h>


> . As to the presence of '.h', it's specific to C. Standard
> C++ headers do not have '.h' in them.


Both <stdio.h> and <cstdio> are part of standard C++. Based on
the C++03 standard, very few compilers actuallly implement
<cstdio> correctly, however, so it's probably best to avoid it.

--
James Kanze (GABI Software) email:
Conseils en informatique orientée objet/
Beratung in objektorientierter Datenverarbeitung
9 place Sémard, 78210 St.-Cyr-l'École, France, +33 (0)1 30 23 00 34
 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Header files with "header.h" or <header.h> ?? mlt C++ 2 01-31-2009 02:54 PM
problem with inluding lapackpp bufu18@wp.pl C++ 12 03-02-2007 06:08 PM
Difference between bin and obj directories and difference between project references and dll references jakk ASP .Net 4 03-22-2005 09:23 PM
Inluding a file in ASP+ Andrew Price ASP .Net 10 02-01-2005 03:28 PM
What is better /standard for creating files. a cpp file with header or cpp and seperate file for header DrUg13 C++ 1 02-10-2004 09:20 AM



Advertisments
 



1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57