Quick Question

This is a discussion on Quick Question within the C Programming forums, part of the General Programming Boards category; Hey all, First post here, i'm (obvoisly) a newbie C programmer. I started looking through some man pages and saw ...

  1. #1
    Registered User
    Join Date
    Mar 2005
    Posts
    5

    Quick Question

    Hey all,
    First post here, i'm (obvoisly) a newbie C programmer.
    I started looking through some man pages and saw lots of data types i have never seen before, like size_t, pid_t, ect.
    I looked in the header files and couldn't decifer what was what, IE they were typdefed to a datatype i've never seen before.
    Is there somewhere where if defines what these datatypes represent in a easy to read manner? a man page?
    Thanks!

  2. #2
    and the hat of wrongness Salem's Avatar
    Join Date
    Aug 2001
    Location
    The edge of the known universe
    Posts
    32,452
    Code:
           #include <sys/types.h>
           #include <unistd.h>
    
           pid_t fork(void);
    My guess is, pid_t is in sys/types.h.
    Most of the time, you don't need to worry about the detail, since you would simply say

    pid_t mypid = fork();

    size_t is one of the few synthetic types which is defined by the C language itself.
    It's the type of result returned by the sizeof operator
    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.
    I support http://www.ukip.org/ as the first necessary step to a free Europe.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Very quick math question
    By jverkoey in forum A Brief History of Cprogramming.com
    Replies: 8
    Last Post: 10-26-2005, 11:05 PM
  2. very quick question.
    By Unregistered in forum C++ Programming
    Replies: 7
    Last Post: 07-24-2002, 03:48 AM
  3. quick question
    By Unregistered in forum C++ Programming
    Replies: 5
    Last Post: 07-22-2002, 04:44 AM
  4. Quick Question Regarding Pointers
    By charash in forum C++ Programming
    Replies: 4
    Last Post: 05-04-2002, 11:04 AM
  5. Quick question: exit();
    By Cheeze-It in forum C Programming
    Replies: 6
    Last Post: 08-15-2001, 05:46 PM

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21