The development of colloidal quantum dots has led to practical applications of quantum confinement, such as in solution-processed solar cells, lasers and as biological labels. Further scientific and technological advances should be achievable if these colloidal quantum systems could be electronically coupled in a general way. For example, this was the case when it became possible to couple solid-state embedded quantum dots into quantum dot molecules. Similarly, the preparation of nanowires with linear alternating compositions--another form of coupled quantum dots--has led to the rapid development of single-nanowire light-emitting diodes and single-electron transistors. Current strategies to connect colloidal quantum dots use organic coupling agents, which suffer from limited control over coupling parameters and over the geometry and complexity of assemblies. Here we demonstrate a general approach for fabricating inorganically coupled colloidal quantum dots and rods, connected epitaxially at branched and linear junctions within single nanocrystals. We achieve control over branching and composition throughout the growth of nanocrystal heterostructures to independently tune the properties of each component and the nature of their interactions. Distinct dots and rods are coupled through potential barriers of tuneable height and width, and arranged in three-dimensional space at well-defined angles and distances. Such control allows investigation of potential applications ranging from quantum information processing to artificial photosynthesis.