C/showbits function
Expert: Prince M. Premnath - 4/4/2007
Questioncan i use showbits() in c under linux.
AnswerDear Mr Satheesh !
The function you have mentioned ( showbits() is not a standard C/C++ Function )
There are different type of C Compiler available in markets today which includes ( 16bit C / C++ Compiler eg , Turbo C++ 3.0 32bit C/C++ Compiler Eg Microsoft Visual c++ 6.0 And so on ) So major difference between these two compiler besides the features is size of data it handles , ( In a 16 bit compiler the size of an integer is 2 byes whereas in a 32 bit compiler size of an integer is 4 bytes of course 32 bits ) so the size of an integer varies depends on the environment, but There is yet another option to overcome this problem is just to check out the size of the integer before using the showbit() function .
Hope i have already presented a code for this function in compatible with 16bit environment , No problem it will work pretty fine in Linux environment, only thing you have to do is to extend/alter the code in compatible with linux environment !
Thanks and regards!
Prince M. Premnath