HACKER Q&A
📣 mettamage

Good resources to learn the C++ preprocessor? (and C preprocessor)


Hello hello!

I'm currently learning C++. I'm currently building a project and going for the second time through a Tour of C++. While that book seems to be amazing for learning the features/syntax of C++, it doesn't explain much about the C++ preprocessor.

So what are good resources for it? C preprocessor articles are welcome too. They make the answer more useful, and they seem to be close enough together anyway.

I found a few articles for searching on HN (see below), but they do not seem geared towards the person who simply wants to read a book or do a MOOC about the C preprocessor. And I'm a bit afraid that I'll get patchy knowledge by jumping from blog post to blog post.

------

* C preprocessor tips and tricks: https://news.ycombinator.com/item?id=11198333

* C preprocessor tips, tricks and idioms: https://news.ycombinator.com/item?id=20779806

* C preprocessor internals: https://news.ycombinator.com/item?id=6311915

* What type of machine is the C preprocessor: https://news.ycombinator.com/item?id=7132562


  👤 mardiyah Accepted Answer ✓

👤 gregjor
Have you looked at the language references? The C Programming Language and The C++ Programming Language?