X-ray diffraction indicates that the structure of the recently discovered room temperature carbonaceous sulfur hydride (C-S-H) superconductor is derived from previously established van der Waals compounds found in the H$_2$S-H$_2$ and CH$_4$-H$_2$ systems. Crystals of the superconducting phase were produced by a photochemical synthesis technique leading to the superconducting critical temperature $T_c$ of 288 K at 267 GPa. Single-crystal x-ray diffraction patterns measured from 124 to 178 GPa, within the pressure range of the superconducting phase, give an orthorhombic structure derived from the Al$_2$Cu-type determined for (H$_2$S)$_2$H$_2$ and (CH$_4$)$_2$H$_2$ that differs from those predicted and observed for the S-H system to these pressures. The formation and stability of the C-S-H compound can be understood in terms of the close similarity in effective volumes of the H$_2$S and CH$_4$ components over a broad range of pressures. The relative amounts of carbon and sulfur in the structure is not determined, and denser carbon-bearing S-H structures may form at higher pressures. The results are consistent with hole-doping enhancement of $T_c$ by carbon proposed for the room-temperature superconductivity in this system.