The PHENIX experiment has measured electrons and positrons at midrapidity from the decays of hadrons containing charm and bottom quarks produced in d+Au and p+p collisions at sqrt(s_NN)=200 GeV at the Relativistic Heavy Ion Collider, in the transverse-momentum range 0.85 < pT < 8.5 GeV/c. In central d+Au collisions, the nuclear modification factor R_dA at 1.5 < pT < 5 GeV/c displays evidence of enhancement of these electrons, relative to those produced in p+p collisions, and shows that the mass-dependent Cronin enhancement observed at RHIC extends to the heavy-D-meson family. A comparison with the neutral-pion data suggests that the difference in cold-nuclear-matter effects on light- and heavy-flavor mesons could contribute to the observed differences between the pi0 and heavy-flavor-electron nuclear modification factor R_AA.