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

Get compiler type (16 or 32 bit) from inside program

P: 26
hello please help me i have no idea about it
that how to write program in c which will find out the compiler type .it means that the program should tell us that r we are using a 16 bit compiler or 32 bit compiler .

please help me if any one know how to write this program
Aug 13 '07 #1
Share this Question
Share on Google+
1 Reply

Expert Mod 5K+
P: 9,197
You cannot do this. The compiler is not around when the program is running. You will need to have a variable set to a value when you compile with a 32-bit compiler and to aa different value when you compile with a 64-bit compiler. But still, when the program runs, the value in the variable does not guarantee that the correct compiler was used.
Aug 13 '07 #2

Post your reply

Sign in to post your reply or Sign up for a free account.