On Apr 30, 8:26*pm, Kenneth Brody <kenbr...@spamcop.net> wrote:
> 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:ThisIsASpamT...@gmail.com>
I think it is a punishment for missing some homework or something. I
totally agree with the Macro approach. Ask your instructor, What is
the point of this assignment?, will I ever work on a project and try
to emulate this?