Thread: Constants

  1. #1
    Registered User
    Join Date
    Oct 2001
    Posts
    42

    Constants

    Im probably making a fool of myself here but here goes


    Can anyone explain why we need statements like this in C++


    Code:
    
    #define FPF_FREE 0x0001  /* free the fp structure */

    I know it's defining the variable FPF_FREE to point to an address, but how would i interpret 0x0001


    And how would i know what gets put at 0x0001


    Marky_Mark
    Last edited by Marky_Mark; 11-26-2001 at 06:05 PM.

  2. #2
    Unregistered
    Guest
    If you want to understand stuff like this, it might be a good idea to learn asm.

  3. #3
    Unregistered
    Guest
    0x0001 is a value in hex not necessarily an address.
    Sometimes it is beneficial to use a different notation.

  4. #4
    Registered User
    Join Date
    Oct 2001
    Posts
    42
    Im interested in low level programming (asm), but i need to know if it's a necessity for programming in C++


    And when is it beneficial to use a different notation


    Marky_Mark

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Help with variables and constants.
    By dave1339 in forum C Programming
    Replies: 2
    Last Post: 12-21-2008, 09:18 PM
  2. Replies: 7
    Last Post: 11-12-2008, 11:00 AM
  3. COnstants
    By shuo in forum C++ Programming
    Replies: 2
    Last Post: 09-01-2007, 04:59 AM
  4. Constants
    By shuo in forum C++ Programming
    Replies: 6
    Last Post: 07-29-2007, 11:51 PM
  5. Help with Constants and enum constants. Newbie learning C++.
    By UnregJDiPerla in forum C++ Programming
    Replies: 5
    Last Post: 01-07-2003, 08:29 PM