Add the feature so that user can code his solution in the text box itself and cross-check his/her solution by compiling there only. Either a separate programme for compiling or hackerearth's API can be used directly.
Note: if implementing your own function do remember to enable sandboxing and time and memory limit's.