We describe version 1.0.6 of the public C++ code 2HDMC, which can be used to perform calculations in a general, CP-conserving, two-Higgs-doublet model (2HDM). The program features simple conversion between different parametrizations of the 2HDM potential, a flexible Yukawa sector specification with choices of different Z2-symmetries or more general couplings, a decay library including all two-body - and some three-body - decay modes for the Higgs bosons, and the possibility to calculate observables of interest for constraining the 2HDM parameter space, as well as theoretical constraints from positivity and unitarity. The latest version of the 2HDMC code and full documentation is available from: http://www.isv.uu.se/thep/MC/2HDMC. New version program summary: Program title: 2HDMC. Catalogue identifier: AEFI_v1_1. Program summary URL: http://cpc.cs.qub.ac.uk/summaries/AEFI_v1_1.html. Program obtainable from: CPC Program Library, Queen's University, Belfast, N. Ireland. Licensing provisions: GNU GPL. No. of lines in distributed program, including test data, etc.: 12 110. No. of bytes in distributed program, including test data, etc.: 92 731. Distribution format: tar.gz. Programming language: C++. Computer: Any computer running Linux. Operating system: Linux. RAM: 5 Mb. Catalogue identifier of previous version: AEFI_v1_0. Journal reference of previous version: Comput. Phys. Comm. 180 (2010) 189. Classification: 11.1. External routines: GNU Scientific Library (http://www.gnu.org/software/gsl/). Does the new version supersede the previous version?: Yes. Nature of problem: Determining properties of the potential, calculation of mass spectrum, couplings, decay widths, oblique parameters, muon g - 2, and collider constraints in a general two-Higgs-doublet model. Solution method: From arbitrary potential and Yukawa sector, tree-level relations are used to determine Higgs masses and couplings. Decay widths are calculated at leading order, including FCNC decays when applicable. Decays to off-shell vector bosons are obtained by numerical integration. Observables are computed (analytically or numerically) as function of the input parameters. Reasons for new version: Improved calculation of the oblique parameters. Summary of revisions: The computation of the oblique parameters has been improved to give reliable results in the case of degenerate masses for the Higgs bosons. Another issue in the oblique parameter calculation, affecting the numerical values of S, U, V, and X (independently of the Higgs boson masses), has been corrected. Restrictions: CP-violation is not treated. Running time: Less than 0.1 s on a standard PC. © 2010 Elsevier B.V. All rights reserved.