#define

This is a discussion on #define within the C++ Programming forums, part of the General Programming Boards category; I want to define a variabel named ihave How shall i do?...

  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, 11:52 AM
  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, 08:22 AM
  5. float toolbar!
    By c-- in forum Windows Programming
    Replies: 5
    Last Post: 02-04-2003, 08:44 AM

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21