By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
446,159 Members | 913 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 446,159 IT Pros & Developers. It's quick & easy.

Combination Generator (via: re-definition of ... types)

P: n/a

Roman Mashak wrote:
I often come across in open-source software (device drivers or network
applications) declarations of standard types with new names, ...
These may be different "types" of typedefs than you had in mind,
but when it isn't fully clear which integer type is best, I like
new type-names so that the assumptions are very clear and
can be easily changed.

For example, my combination generator has
/* index to items: */
typedef unsigned short Dindex;

/* index to or number of combinations of items: */
typedef long Combnum;
(Usually anything would work, but "short" would be
inadequate in some applications, and "long" use
excessive memory for arrays in other applications.)

Perhaps I should start a new thread to "announce" it,
but readers are welcome to use (or better yet,
offer comments on) that combination generator:


James Dow Allen

Sep 25 '06 #1
Share this question for a faster answer!
Share on Google+

This discussion thread is closed

Replies have been disabled for this discussion.