-
Help
How can implement exponents in C
im trying to do this line
total+=2**counter;
which is 2 to the exponent 'counter' but borland 5.5 compiler spits this error message out at me
--> Invalid indirection in function
how can I ix this ?
-
Programming Sex-God
#include<math.h>
pow( 2.0, counter );
Or, if counter is an integer, you can just leftshift.
1 << counter;
Last edited by Polymorphic OOP; 01-17-2003 at 11:36 PM.
-
Thank you!
Thank you very much for replying.
too bad I found that command after I posted on my professor's resource website :P, anyhow it's nice to know someone cares thx again poly
Popular pages
Recent additions