Part 1:
// Header.h
void func(); // Declares func()
// File1.cc
#include "Header.h"
void func() { // Defines func()
...
}
// File2.cc
#include "Header.h"
... // Do something else
func(); // Calls func()
Part 2:
// Header.h
inline void func() { // Defines func()
...
}
// File2.cc
#include "Header.h"
... // Do something else
... // Code for func()
Preview:
downloadDownload PNG
downloadDownload JPEG
downloadDownload SVG
Tip: You can change the style, width & colours of the snippet with the inspect tool before clicking Download!
Click to optimize width for Twitter