Macros in C

boschow's Avatar, Join Date: Feb 2007
Go4Expert Member
just lately i heard about macros in C, and i was wandering what are they used for and how are they written? Can please someone tell me this.

Best Regards,
aVague's Avatar, Join Date: May 2007
Go4Expert Member
macros is like a function
differenses are:
text of macros is putting every time ,when you use it in a programm(function - 1 time)

and this is a processor directive , that means nothing else can have its name

so macros is used to avoid mistakes when you use some operation many times