Reputation: 44385
I am trying to learn to develop C++ code with eclipse. I have create a class in a cpp file. Do I need to create an include file by hand (just copy and paste the header definitions), or is there some fancy eclipse button which can create the header file automatically for me?
Upvotes: 1
Views: 102
Reputation: 55
Eclipse CDT allows you to write a prototype in the header file, and automatically add it to the C++ file. Steps to follow 1.Add function prototype to .h file void funct() 2.Select the function name "funct" (try double clicking) 3.In the toolbar click Source -> Implement Method 4.Wizard it up
Upvotes: 1
Reputation: 1343
As far as I know there is no way to generate a header-file out of the cpp. Instead, by using the other direction, it should be possible to generate a method-stub from the function definition within the header (by selecting function-prototype, MenuBar: "Source" > "Implement Method").
Maybe there are some plugins available that do what you want.
Upvotes: 2