We discuss a variant of density of states (DoS) techniques for lattice field theories, the so-called "functional fit approach" (FFA). The DoS FFA is based on a density of states ρ(x) which is parameterized on small intervals of the argument x of ρ(x). On these intervals restricted Monte Carlo simulations with an additional Boltzmann factor exp(λ x) allow to determine ρ(x) very precisely by obtaining its parameters from fitting the Monte Carlo data to a known function of λ .We describe the method in detail and show its applicability in four different systems, three of which have a complex action problem: The SU(3) spin model with a chemical potential, U(1) lattice gauge theory, the Z 3 spin model with chemical potential, and 2-dimensional U(1) lattice gauge theory with a topological term. In all cases we compare to reference calculations, which partly were done in a dual formulation where the complex action problem is absent. In all four cases we find a very encouraging performance of the DoS FFA.