Here is an example from C++

int bar() { return 0; }

Here is an example from Python

def tidum(): return 0

More from the same file, with extra text wrapping the snippet

[sourcecode language="cpp"] int baz() { return 0; } [/sourcecode]