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.
Related Contents:
- Difference between and ?
- Including C headers inside a C++ program
- What is the difference between #include and #include “filename”?
- Why have header files and .cpp files? [closed]
- “using namespace” in c++ headers [duplicate]
- Why aren’t my include guards preventing recursive inclusion and multiple symbol definitions?
- Why should I not include cpp files and instead use a header?
- Using G++ to compile multiple .cpp and .h files
- What should go into an .h file?
- Splitting templated C++ classes into .hpp/.cpp files–is it possible?
- C++ #include guards
- How to make a .lib file when have a .dll file and a header file
- Where does Visual Studio look for C++ header files?
- Tool to track #include dependencies [closed]
- C++ Redefinition Header Files (winsock2.h)
- Header guards in C++ and C
- multiple definition in header file
- How should I detect unnecessary #include files in a large C++ project?
- How to read a CMake Variable in C++ source code
- Difference between iostream and iostream.h
- Headers Including Each Other in C++
- Change the current working directory in C++
- cstdio stdio.h namespace
- using namespace std; in a header file
- static variables in an inlined function
- How can a C++ header file include implementation?
- C/C++ header and implementation files: How do they work?
- C++ Header Files, Code Separation
- Which headers in the C++ standard library are guaranteed to include another header?
- How to create two classes in C++ which use each other as data?
- Forward declare a standard container?
- Tools to find included headers which are unused? [closed]
- Is the backslash acceptable in C and C++ #include directives?
- C++ Header order [closed]
- Is #pragma once part of the C++11 standard?
- scope of using declaration within a namespace
- *.h or *.hpp for your class definitions
- Is it a good practice to define C++ functions inside header files? [duplicate]
- Self-sufficient header files in C/C++
- Cyclic dependency between header files
- C++ Circular Dependency in Header Files
- Define constant variables in C++ header
- cmath vs math.h (And similar c-prefixed vs .h extension headers)
- Writing function definition in header files in C++
- C++ class header files organization
- Header file included only once in entire program?
- c++ template and header files [duplicate]
- What’s the differences between .dll , .lib, .h files?
- error: Class has not been declared despite header inclusion, and the code compiling fine elsewhere
- How do I include the string header?