Created
June 18, 2021 19:55
-
-
Save heeh/a872c61e4d3723cd4d7ffb66e9a94b9c to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(defun compileandrun() | |
(interactive) | |
(let* ((src (file-name-nondirectory (buffer-file-name))) | |
(exe (file-name-sans-extension src))) | |
(compile (concat "g++ -std=c++11 -Wshadow -Wall " src " -o " exe " -O2 -Wno-unused-result && ./" exe)))) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment