2 Replies - 1052 Views - Last Post: 22 May 2011 - 09:33 AM Rate Topic: -----

#1 nix_13  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 1
  • Joined: 21-May 11

what is the use of pre-processor directive ?

Posted 22 May 2011 - 12:40 AM

what is the use of pre-processor directive ?
Is This A Good Question/Topic? 0
  • +

Replies To: what is the use of pre-processor directive ?

#2 Aphex19  Icon User is offline

  • Born again Pastafarian.
  • member icon

Reputation: 614
  • View blog
  • Posts: 1,873
  • Joined: 02-August 09

Re: what is the use of pre-processor directive ?

Posted 22 May 2011 - 01:32 AM

Pre-processor directives are always executed/processed before compilation of the actual code. For example, when you write a macro, before the compiler starts actually compiling your code, it will replace any occurence of your macro identifier with the contents of your macro.

A quick google search would tell you all you need to know about pre-processor directives though.
Was This Post Helpful? 1
  • +
  • -

#3 KYA  Icon User is offline

  • g++ jameson.cpp -o beverage
  • member icon

Reputation: 3089
  • View blog
  • Posts: 19,137
  • Joined: 14-September 07

Re: what is the use of pre-processor directive ?

Posted 22 May 2011 - 09:33 AM

We have a couple nice tutorials on the subject here at DIC:

Intro by RodgerB
A follow up to the intro by KYA
Was This Post Helpful? 0
  • +
  • -

Page 1 of 1