Skip to content

Instantly share code, notes, and snippets.

@sergiobuj
Created April 9, 2010 23:18
Show Gist options
  • Save sergiobuj/361686 to your computer and use it in GitHub Desktop.
Save sergiobuj/361686 to your computer and use it in GitHub Desktop.
Function to compile and run g++ Topcoder problems
;; TopCoder .cc compile function. (When using .cpp change -3 -> -4 -two times-)
(defun tc () (interactive)
(compile (concat "g++ " (buffer-name)" -Wall -g -o "(substring (buffer-name) 0 -3)" && ./"(substring (buffer-name) 0 -3)))
)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment