#define....



Hi,

I am starting out in programming embeded VC++ for embeded solutions.

I am seeing this in many example programs of the "Programming Microsoft
Windows CE .NET" book where the following define statement appears at the top
of their header file examples.

#define dim(x) (sizeof(x) / sizeof(x[0]))

I am trying to understand what this line has to do with the rest of the
code. If anyone has this book (Isbn# 0-7356-1884-4) the ex. starts on P.18.

The way I see this is that we are dividing the size of x by the size of x[0]
and defining this by Dim(x). IM LOST!

ANYONE PLEASE!!!!!

Robert

--
Best regards
Robert
.



Relevant Pages

  • Re: RW and "good COBOL" (was: Cobol Myth Busters
    ... You really must watch these sweeping statements, Robert, if you wish to ... that they do remove most credibiltiy from his posts on most subjects (IN ... On the positive side I believe Robert has enough experience with COBOL ... ("it is only computer programming"). ...
    (comp.lang.cobol)
  • Re: RW and "good COBOL" (was: Cobol Myth Busters
    ... You really must watch these sweeping statements, Robert, if you wish to ... his posts just on face value, they ARE better this time around. ... IT in general) to have earned a place here, he DOES care about COBOL, and he ... Cobol programmers are in laughing stock in places that do real programming. ...
    (comp.lang.cobol)
  • Re: Taking the bull by its horns [was background]
    ... after university a bit of C++ coding and then Java. ... like bash / sh programming and use Ruby for small day to day data ... and of course lots of SQL ... Robert, IMHO Pascal is a great language for learning to program ...
    (comp.lang.ruby)
  • Re: [LogoForum] Re: Logo as a vehicle for music making
    ... I teach a programming course with this toolkit as infrastructure. ... > Robert> Hi all: It's been years since I worked much with Logo, ... > Check this NetLogo program out: ...
    (comp.lang.logo)
  • Re: Static variables in Ruby.
    ... design if it relies on such archaic features of other programming ... languages. ... Kind regards ...
    (comp.lang.ruby)

Loading