From mboxrd@z Thu Jan 1 00:00:00 1970 From: Roger Mason Subject: Capturing output from C/C++ Date: Thu, 05 Mar 2015 12:57:20 -0330 Message-ID: Mime-Version: 1.0 Content-Type: text/plain Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:55974) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YTYcQ-0003Pd-RX for emacs-orgmode@gnu.org; Thu, 05 Mar 2015 11:27:30 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1YTYcN-0002l5-Md for emacs-orgmode@gnu.org; Thu, 05 Mar 2015 11:27:26 -0500 Received: from nina.ucs.mun.ca ([134.153.232.76]:54732) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YTYcN-0002gj-FQ for emacs-orgmode@gnu.org; Thu, 05 Mar 2015 11:27:23 -0500 Received: from cryptoperthite.esd.mun.ca.esd.mun.ca (cryptoperthite.esd.mun.ca [134.153.37.33]) by nina.ucs.mun.ca (8.13.1/8.13.1) with ESMTP id t25GRK9I012186 (version=TLSv1/SSLv3 cipher=AES128-SHA bits=128 verify=NO) for ; Thu, 5 Mar 2015 12:57:21 -0330 List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Sender: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org To: emacs-orgmode@gnu.org Hello, I have a short C++ program: #+BEGIN_SRC cpp :flags -lm :results output #include #include #include // for ceil #include // for atof double f (double fv, double o, int i) { return fv / 2.0 + (1.0 - o) * fv * i; } int num (double d, double fv, double o) { return (int)ceil( d / ((1.0 - o) * fv )); } int main (int argc, char* argv[]) { if ( argc < 6 ) { std::cout << "Usage:\n" << std::endl; std::cout << "grid w fovx ox h fovy oy\n" << std::endl; return 1; } ... #+END_SRC that outputs some data to stdout. So far I have not been able to capture the output of the program back into to my org buffer. Is that possible and, if so, how? Thanks, Roger Org-mode version 8.2.6