tools to allow C++ development, with out separate .h .cpp files

188 views Asked by At

I am developing some c++ code, but having code separated in to .h and .cpp is driving me mad, as it is slowing down re-factoring.

Is there a tool that lets one work on a single file. An editor that just hides the truth, or a per-processor that takes a single file and produces the two files .cpp and .h

clarification: I want a single file per compilation unit (like Java, C♯, Eiffel). I will still have to have #include in files to include the headers of other modules. (but then Java and c♯ have import and using).

clarification 2:

Things are easier if everything that should be together is together. i.e. one and only one file per class.

2

There are 2 answers

1
Ferruccio On BEST ANSWER

There's Lzz. I haven't tried it, but it seems like what you're looking for.

1
David Rodríguez - dribeas On

Whatever tool you try to use to do this will only hide some of the complexity or make your code C++-unlike and that will in turn make it harder for others to read/maintain.

I recommend that you just learn and get used to the compilation model of the language rather than fighting it. Deciding what goes into the header and/or the implementation is not an automated process, but rather part of the design and tools cannot design for you. Any automated tool to do that will end up generating a less than perfect result, probably longer compile times and/or leaking implementation details to the users of your headers.