The purpose of this paper is (i) to present a generic and fully functional implementation of the density-matrix renormalization group (DMRG) algorithm, and (ii) to describe how to write additional strongly-correlated electron models and geometries by using templated classes. Besides considering general models and geometries, the code implements Hamiltonian symmetries in a generic way and parallelization over symmetry-related matrix blocks. Program summary Program title: DMRG++ Catalogue identifier: AEDJ_v1_0 Program summary URL: http://cpc.cs.qub.ac.uk/summaries/AEDJ_v1_0.html Program obtainable from: CPC Program Library, Queen's University, Belfast, N. Ireland Licensing provisions: See file LICENSE No. of lines in distributed program, including test data, etc.: 15 795 No. of bytes in distributed program, including test data, etc.: 83 454 Distribution format: tar.gz Programming language: C++, MPI Computer: PC, HP cluster Operating system: Any, tested on Linux Has the code been vectorized or parallelized?: Yes RAM: 1 GB (256 MB is enough to run included test) Classification: 23 External routines: BLAS and LAPACK Nature of problem: Strongly correlated electrons systems, display a broad range of important phenomena, and their study is a major area of research in condensed matter physics. In this context, model Hamiltonians are used to simulate the relevant interactions of a given compound, and the relevant degrees of freedom. These studies rely on the use of tight-binding lattice models that consider electron localization, where states on one site can be labeled by spin and orbital degrees of freedom. The calculation of properties from these Hamiltonians is a computational intensive problem, since the Hilbert space over which these Hamiltonians act grows exponentially with the number of sites on the lattice. Solution method: The DMRG is a numerical variational technique to study quantum many body Hamiltonians. For one-dimensional and quasi one-dimensional systems, the DMRG is able to truncate, with bounded errors and in a general and efficient way, the underlying Hilbert space to a constant size, making the problem tractable. Running time: The test program runs in 15 seconds.