You can't convert #"g/cm"^3# directly to #"g/mol"#, if that is really what you mean there must be more information provided. If meant to convert to #"g/mL"# there's a simple conversion factor #1"cm"^3=1"mL"#, so #X"g/cm"^3times(1"cm"^3)/(1"mL")=X"g/mL"#