In the last lecture we used the preprocessor to include a library. But it can do more stuff than just include files. The preprocessor, as the name suggest, runs before the compiler and does some initial work. It includes the files, expands macros, gives you compile time information and provides you if conditional compilation. Preprocessor directives always start with #.

Some of its features should be used with great care. Macros are very powerful, but they aren't type checked and are hard to debug. Conditional compilation is useful to define debug only features or define platform-agnostic macros, but they also can make your code harder to read. For now we just take a look at macros. In a later part of the course we will revisit this topic.

A macro is something that the preprocessor will replace with what ever you specify. To define a macro you simply write <it>#define</it> then the name of the macro with optional parameters in parentheses and then what you want your macro to expand to. If your macro expands to another macro, then this process starts again.

Your task is to find the error in the Square macro and define a macro yourself.