1. Due to the recent site upgrade, the iPadForums (iPF) App will no longer work. The new iPadForums.net website has been designed from the ground up to work perfectly from any mobile, tablet, or desktop computer using the built in internet browser. Create a shortcut to iPadForums.net on your home screen by following these steps: Create an icon for iPadForums.net

When to use #define and const

Discussion in 'iPad Development' started by NumbLock, Nov 6, 2010.

  1. NumbLock
    Offline

    NumbLock iPad Ninja

    Joined:
    May 2, 2010
    Messages:
    2,017
    Thanks Received:
    32
    Trophy Points:
    48
    Location:
    Switzerland
    Ratings:
    +32 / 0
    Hi Devs,

    I understand that const is a statement and #define is a preprocessor directive, but when should one use one or the other?
  2. jychong
    Offline

    jychong iPF Noob

    Joined:
    Dec 18, 2010
    Messages:
    7
    Thanks Received:
    0
    Trophy Points:
    0
    Location:
    Sg
    Ratings:
    +0 / 0
    In general if you are going the C++ route and you don't need a preprocessor, const is the way to go since it is cleaner.

Share This Page