2 Replies - 209 Views - Last Post: 05 October 2012 - 11:39 PM Rate Topic: -----

#1 dency  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 1
  • Joined: 05-October 12

why # in C before include statement

Posted 05 October 2012 - 10:52 PM

why # in C before include statement
Is This A Good Question/Topic? 0
  • +

Replies To: why # in C before include statement

#2 Salem_c  Icon User is offline

  • void main'ers are DOOMED
  • member icon

Reputation: 1657
  • View blog
  • Posts: 3,136
  • Joined: 30-May 10

Re: why # in C before include statement

Posted 05 October 2012 - 11:36 PM

http://en.wikipedia..../C_preprocessor
Because # is an instruction for the C pre-processor, not the compiler.
Was This Post Helpful? 0
  • +
  • -

#3 AKMafia001  Icon User is offline

  • </code.in.dream>

Reputation: 187
  • View blog
  • Posts: 624
  • Joined: 11-June 11

Re: why # in C before include statement

Posted 05 October 2012 - 11:39 PM

Well! It is a C-style of defining Macros and including Header files...
e.g.
#define Identifier Value
&
#include header


Also, as Salem_c mentioned, these directive are processed by the per-processor before compilation. The header files are included in the specified file and the Macros are evaluated to the value they are defined to...

Hope this Helps!

This post has been edited by AKMafia001: 05 October 2012 - 11:48 PM

Was This Post Helpful? 0
  • +
  • -

Page 1 of 1