Results 1 to 4 of 4

Thread: c++ header files

  1. #1
    Join Date
    Mar 2005
    Location
    Isle of Bute, Scotland
    Beans
    369
    Distro
    Ubuntu Gnome 14.04 Trusty Tahr

    c++ header files

    I am trying to make sense of C++ and headers.
    I posted yesterday about a problem I had and the solution was that C++ headers did not include .h in them
    This worked fine but i am not sure if all header files need to be like this or not. The program I have been trying to write now includes
    Code:
    #include <cstdio>
    #include <ctime>
    #include <cstring>  /* String function definitions */
    #include <cstdlib>
    
    #include <fcntl.h>   /* File control definitions */
    #include <errno.h>   /* Error number definitions */
    #include <SDL/SDL.h>
    #include <sys/io.h>
    #include <iostream>
    using namespace std;
    Now I can see that all the c++ ones do not have '.h' at the end but is there some list which I can refer to so for example, I could use the c++ equivalent to fcntl.h?
    Running 14.04 on my HP Pavilion g6 4 Gig Ram 320 Gig Disc

  2. #2
    Join Date
    Dec 2010
    Beans
    13

    Re: c++ header files

    Hey,

    Look in the internet for C++ API.

    As an example: http://www.cplusplus.com/reference/

  3. #3
    Join Date
    Mar 2005
    Location
    Isle of Bute, Scotland
    Beans
    369
    Distro
    Ubuntu Gnome 14.04 Trusty Tahr

    Re: c++ header files

    Quote Originally Posted by leviteo View Post
    Hey,

    Look in the internet for C++ API.

    As an example: http://www.cplusplus.com/reference/
    Great thanks, just what I was looking for!
    Running 14.04 on my HP Pavilion g6 4 Gig Ram 320 Gig Disc

  4. #4
    Join Date
    Jun 2011
    Location
    United Kingdom
    Beans
    Hidden!
    Distro
    Lubuntu Development Release

    Re: c++ header files

    Quote Originally Posted by linuxonbute View Post
    Great thanks, just what I was looking for!
    Any that you don't find in the C++ standard library will *usually* have ".h" appended to them, or, more rarely, ".hpp".

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
  •