Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Possible to generate hpp or h file automatically?

Sorry for the noop question, but is it possible (In Visual C++ 2010 or some other IDE) to generate the header file automatically based on the variables and code in the actual source code (.cpp) files?

Thanks!

like image 721
AZhu Avatar asked Oct 21 '25 05:10

AZhu


2 Answers

Most IDE's support some command like 'Create class' which creates a skeleton .h/.cpp file pair for you.
Additionally the Eclipse CDT IDE supports a command 'Implement methods' that will create member function bodies from the declarations in the header file.

Another option is to use a separate or builtin CASE or UML tool that is able to generate code from your model (I think there's a free UML modelling plugin available for Eclipse, never used this myself though).

like image 154
πάντα ῥεῖ Avatar answered Oct 23 '25 18:10

πάντα ῥεῖ


*.h or *.hpp files are a part of the actual source code. So, in common case it is impossible.

like image 20
D_E Avatar answered Oct 23 '25 17:10

D_E



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!