I have this following code that I saw in an example and I am trying to understanding what it does. I came across two methods approve and allowance and I am not understanding what it does. Can you explain?
The code is as follows:
contract Token {
uint256 public totalSupply;
function balanceOf(address _owner) constant returns (uint256 balance);
function transfer(address _to, uint256 value) returns (bool success);
function transferFrom(address _from, address _to, uint256 value) returns (bool success);
function approve(address _spender, uint256 _value) returns (bool success);
function allowance(address _owner, address _spender) constant returns (uint256 remaining);
event Transfer(address indexed _from, address indexed _to, uint256 _value);
event Approval(address indexed _owner, address indexed _spender, uint256 _value);
}