# Global functions

## Recommended Posts

Mizipzor    247

##### Share on other sites
ToohrVyk    1595
// function.cpp : definitionvoid frobnicate() {  // Body};// function.hpp : declarationvoid frobnicate();// user.cpp : usage#include "frobnicate.hpp"void use() {  frobnicate();}

##### Share on other sites
Mizipzor    247
Ah! Thanks, thats clearly one way to do it. Are there any particular reason why I should use .hpp instead of .h?

##### Share on other sites
ToohrVyk    1595
Quote:
 Original post by MizipzorAh! Thanks, thats clearly one way to do it. Are there any particular reason why I should use .hpp instead of .h?

I use C as well as C++ files in my projects. In particular, the void frobnicate(); line line of code would be interpreted differently by the two languages, so I make sure to mention it's a C++ file. Besides, using .h for C++ files screws up my emacs syntax hilighting (since it expects C files).

##### Share on other sites
Mizipzor    247
I see. Thanks for the help, rating++ for you. :)