Skip to content

Instantly share code, notes, and snippets.

@yaotti
Created February 21, 2010 14:43
Show Gist options
  • Save yaotti/310344 to your computer and use it in GitHub Desktop.
Save yaotti/310344 to your computer and use it in GitHub Desktop.
(defun c++-debug-print()
(interactive)
(let* ((var-str (read-from-minibuffer "variables (space separated): "))
(vars (split-string var-str))
(dp "cout"))
(dolist (v vars)
(setq dp (concat dp " << " v " << \", \"")))
(insert (concat dp " << endl;"))))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment