Welcome, Guest. Please login or register.

Author Topic: sizeof (*VarPtr) possible ?  (Read 5311 times)

Description:

0 Members and 1 Guest are viewing this topic.

Offline neuroflip

  • Full Member
  • ***
  • Join Date: Apr 2006
  • Posts: 200
    • Show all replies
    • http://a1200.wordpress.com
Re: sizeof (*VarPtr) possible ?
« on: January 30, 2007, 06:07:32 PM »
i'm a bit lost cause it makes a lot of time that i don't type any code line in C, but... if u make a sizeof a pointer type you'll get the size of the pointer, not the size of the content that this pointer points to... then... why don't you call sizeof() using the expected type that pointer points to?

the macro can result different kind of types? then probably you can make a compiler directive, or something similar depending of the macro result type?

i repeat... i'm a bit lost with C now :-D
[http://a1200.wordpress.com (spanish)
a1200 + Bliz1260/50Mhz/64Mb + HD10Gb + a520 svideo mod + Wireless PCMCIA Elsa MC-11 + PCMCIA CF + Adaptator + CF 256Mb + a500 + 512Kb]