Thread: #define

  1. #1
    Registered User
    Join Date
    May 2002
    Posts
    23

    Question #define

    I want to define a variabel named ihave

    How shall i do?
    .. zzz soooo tireed.

  2. #2
    Me want cookie! Monster's Avatar
    Join Date
    Dec 2001
    Posts
    680
    What do you mean with define? Like the #define directive or do you want to declare a variabele like an int?
    Code:
    #define ihave 10
    
    int main(void)
    {
      cout << ihave << endl;
      return 0;
    }
    Code:
    int main(void)
    {
      int ihave = 10;
      cout << ihave << endl;
      return 0;
    }

  3. #3
    Registered User
    Join Date
    May 2002
    Posts
    23
    I meant like you wrote in the first code snippet.
    Thank You!Thank You!Thank You!

    .. zzz soooo tireed.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Pointer within a Struct
    By Bladactania in forum C Programming
    Replies: 11
    Last Post: 04-03-2009, 10:20 PM
  2. Why?!?
    By p3rry in forum C Programming
    Replies: 3
    Last Post: 01-08-2009, 12:52 PM
  3. size of an integer pointer
    By onebrother in forum C Programming
    Replies: 5
    Last Post: 07-09-2008, 11:49 AM
  4. Please STICKY this- vital to MSVC 6 dev - BASETSD.h
    By VirtualAce in forum Game Programming
    Replies: 11
    Last Post: 03-15-2005, 09:22 AM
  5. float toolbar!
    By c-- in forum Windows Programming
    Replies: 5
    Last Post: 02-04-2003, 09:44 AM