Charge asymmetry in hadroproduction of heavy quarks