@jr_coder Preprocessor JUST replaces the macro-name with the text given in the code. It doesn’t add anything else. it just copies and paste the text at the place of macro-name!
As told by @abhinav92003 it works fine if you use PI as ;
Could you show your whole code, then it will be easier to know the cause of error (if any error occurs)
#define PI 3.14; don’t shows an error if you use it like I did here : http://ideone.com/AyFTDX
But if you add semi-colon after you have ended one statement, then it wont throw any error since just a ; (semi-colon) is a null statement! (Example : http://ideone.com/8znOp5)
But something like this can also happen : https://discuss.codechef.com/questions/88958/when-defining-macros-why-do-we-have-to-give-the-value-in-the-function
So it’s always better to use it like this (Where you don’t include ; (semi-colon) in the text used in defining the macro) : http://ideone.com/LUSZX7
@jr_coder I hope this helps