3

I'm tired of copy pasting the header into my cpp file then hacking at it until its in the correct form. Has anyone made a program to read a header file and make a corresponding cpp skeleton? I need something that is cross platform or bare minimum works on Linux. A vim plugin would also be acceptable.

Example

class A
{
    public:
        int DoSomething( int number );
}

Would produce the following file

int A::DoSomething( int number )
{
    ;
}
David Stocking
  • 1,200
  • 15
  • 26

3 Answers3

2

You can try to play around with LazyCplusplus. Or you can try out Visual Assist X for Visual Studio.

Instead of strinking C++ from the records, I'd rather wait for C++ promised modules. :)

Edit : actually this seems a duplicate of your question : Seeking code stub generator (from header files)

Community
  • 1
  • 1
Kornel Kisielewicz
  • 55,802
  • 15
  • 111
  • 149
2

http://www.vim.org/scripts/script.php?script_id=2624

Kniganapolke
  • 5,073
  • 5
  • 22
  • 19
0

Almost every IDE has built-in features or plugins that do that for you - e.g. for Visual Studio Visual Assist X provides many convenience features.
There are also many code generation utilities, you could also create one use yourself using e.g. gcc-xml and the scripting language of your choice.

Marc.2377
  • 7,807
  • 7
  • 51
  • 95
Georg Fritzsche
  • 97,545
  • 26
  • 194
  • 236