Re: size_t

Tech Tip: Click here to run a free scan for Windows Errors and optimize PC performance



George wrote:
Hi Bo Persson,


I am confused about your comments. Do you mean we need include some
header file to use size_t or not? From testing, seems we do not
need to include any header file in order to use size_t.

We need to include a header to get access to size_t, because it is a
typedef.


My test environment, VC 2008.

VC2008 knows about size_t even without a header, because the compiler
uses the type itself. When you use it, you should include the
appropriate header.


Bo Persson



.



Relevant Pages

  • Re: header files including other files
    ... Really I guess I am asking advice about source code organisation. ... Now, in any particular module, the module header file declares exported ... compile it with no errors. ...
    (comp.arch.embedded)
  • Re: [DRIVER SUBMISSION] DRBD wants to go mainline
    ... header file. ... and then include some header after that. ... I want to be able to do a rate-limit per specific message/code fragment, ... When I earlier said I thought I was in macro hell, well, I was ...
    (Linux-Kernel)
  • Re: "I want to ask about c++"
    ... This is called a "header include guard", or simply a "header guard". ... With very rare exceptions, you should not define an object in a header file, nor a non-static function. ... The reservations are restricted only because the second character of the identifier was a 'd'. ...
    (comp.lang.c.moderated)
  • Re: headerfiles and make?
    ... How can I compile using the above makefile when types.h is ... used in your source code tells the compiler to look for it. ... Since a Makefile isn't necessary for compiling a program the header ... rectlive tells the compiler to look for a header file and evaluate ...
    (comp.unix.programmer)
  • Re: About different versions of the same header files
    ... Now there are mulitple places where this header file is kept. ... I don't see why it would *need* to be in multiple locations. ... But the OP's problem is that he's dealing with a huge code base that's ...
    (comp.lang.c)