
#include <iostream>
using std::cout;
using std::endl;

void OneParam(int);
void TwoParams(int, int=666);

void A() {
  //The following is an error...
  //OneParam();
  TwoParams(999); //calls TwoParams(999, 666)
}

void OneParam(int n = 666) {
   cout << n << endl;
}

void TwoParams(int i=999, int j) { //lolwut? Default parameters have to be at the end!
   cout << i << " " << j << endl;
}

void B() {
   OneParam(); //calls OneParam(666)
   TwoParams(); //calls TwoParams(999, 666)
}

int main() {
   A();
   B();
}
