Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Is there a tool for automatic conversion of header into cpp and hpp files?

Tags:

c++

ide

I have a (possibly bad) habit of coding everything into a monolithic header file when trying out ideas, placing all implementation code with the class definitions. As the code expands, it becomes difficult to navigate the file. Therefore, I refactor the code into separate files and split the implementation details (cpp files) from the interface (hpp files).

The laborious copy / pasting involved seems like a job for a machine. Are there any simple tools available for this task?

like image 596
learnvst Avatar asked Dec 03 '25 23:12

learnvst


1 Answers

You can try Lazy C++, as stated in this question.

You can also use a standard IDE, and move each function from header to source (for Visual Studio you can use Visual Assist, I think Eclipse can do it straight), generally it's like right click > refactor > move to source or something like that.

like image 143
Synxis Avatar answered Dec 06 '25 15:12

Synxis