Can I write C++ code without headers (repetitive function declarations)?

thewreck picture thewreck · Jun 16, 2009 · Viewed 41.1k times · Source

Is there any way to not have to write function declarations twice (headers) and still retain the same scalability in compiling, clarity in debugging, and flexibility in design when programming in C++?

Answer

Richard Corden picture Richard Corden · Jun 16, 2009

Use Lzz. It takes a single file and automatically creates a .h and .cpp for you with all the declarations/definitions in the right place.

Lzz is really very powerful, and handles 99% of full C++ syntax, including templates, specializations etc etc etc.

Update 150120:

Newer C++ '11/14 syntax can only be used within Lzz function bodies.