using namespace std; template <class T> void f(T) { static int i = 0; cout << ++i; } int main() { f(1); f(1.0); f(1); }
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