Hi,
I am new here and new in learning C. I'm using the book Let Us C to learn how to program in C. The book uses TurboC but I decided to go for Code::Blocks isntead. I am at the chapter where you can add your custom function to a library. The instruction is written for TurboC though. Can you help me on how to do it in Code::Blocks? I tried to look it up but I can't find a good resource that can teach me on how to do it.
Here's what I have so far. I have a file called fact.c with the following codes:
What I need to do next is add this file to a math library.Code:int factorial ( int num ) { int i, f = 1 ; for ( i = 1 ; i <= num ; i++ ) f = f * i ; return ( f ) ; }
Thanks your for help.