#include <iostream>
using namespace std;

void f(int a=1);     // forward declaration with a default value for the compilation unit
void f(int a)        // definition 
{
	cout<<a<<endl; 
}
void g() {
	void f(int a=2);  // declaration in the scope of g
	f();
}
int main() {
	f();			// uses general default => 1
	g();			// uses default defined in g => 2
	return 0;
}