could somebody tell wats wrong with this
#define FOR(x,n)for(typeof(x);x<n;x++)
aryansmit3754 -1 Newbie Poster
Recommended Answers
Jump to PostFirstly, there is no space between the closing bracket at the end of FOR(x,n) and preceding the rest. That's a stylistic concern, but badly hurts readability.
Second, and more significantly, typeof() is not a standard function or operator in C++. It is an extension specific to g++ (GNU c++) …
Jump to PostApart from anything else this useless macros must be
#define FOR(x,n)for(typeof(x)x=0;x<(n);x++)
All 5 Replies
MosaicFuneral 812 Nearly a Posting Virtuoso
grumpier 149 Posting Whiz in Training
ArkM 1,090 Postaholic
bobpaul 0 Newbie Poster
mrnutty 761 Senior Poster
Be a part of the DaniWeb community
We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.