// this goes in your header (.h) file
class Example {
public:
void print_thing(int);
};
// end header file
// from here on is the .cpp file
#include <iostream>
void Example::print_thing(int x) {
std::cout << "Your integer is " << x << std::endl;
}
int main() {
Example e;
e.print_thing(5);
}
Ly8gdGhpcyBnb2VzIGluIHlvdXIgaGVhZGVyICguaCkgZmlsZQpjbGFzcyBFeGFtcGxlIHsKcHVibGljOgoJdm9pZCBwcmludF90aGluZyhpbnQpOwp9OwovLyBlbmQgaGVhZGVyIGZpbGUKCgovLyBmcm9tIGhlcmUgb24gaXMgdGhlIC5jcHAgZmlsZQojaW5jbHVkZSA8aW9zdHJlYW0+Cgp2b2lkIEV4YW1wbGU6OnByaW50X3RoaW5nKGludCB4KSB7CglzdGQ6OmNvdXQgPDwgIllvdXIgaW50ZWdlciBpcyAiIDw8IHggPDwgc3RkOjplbmRsOwp9CgppbnQgbWFpbigpIHsKCUV4YW1wbGUgZTsKCWUucHJpbnRfdGhpbmcoNSk7Cn0K