|
|
Eugeny Myunster wrote:
>
> Hello all,
> How can i emulate sizeof()
> only for integers?
I'd really love to know which instructors keep giving this assignment.
Why do you want to "emulate sizeof", when sizeof exists just for this
purpose?
How about:
#define MySizeof(x) sizeof(x)
Now you can "emulate sizeof" by using "MySizeof(int)", for example.
--
+-------------------------+--------------------+-----------------------+
| Kenneth J. Brody | www.hvcomputer.com | #include |
| kenbrody/at\spamcop.net | www.fptech.com | <std_disclaimer.h> |
+-------------------------+--------------------+-----------------------+
Don't e-mail me at: <mailto:ThisIsASpamTrap@xxxxxxxxx>
|
|