Beispiel: Kontoführung (II)

ist das eine Lösung?
void transfer 
       (Account from, Account to, int m) 
{
  from.lock(); to.lock ();
  from.withdraw (m);
  to.deposit (m);
  from.unlock(); to.unlock();
}



Johannes Waldmann 2013-02-01