From mboxrd@z Thu Jan 1 00:00:00 1970 From: Thierry Banel Subject: Re: evaluate cpp snippet in org babel with default includes and customized entry point Date: Sat, 16 Sep 2017 11:11:14 +0200 Message-ID: <59BCEAB2.3020708@free.fr> References: <877ewz9j4x.fsf@gmail.com> <59BCE1F6.3060406@free.fr> <8760cj9gz2.fsf@gmail.com> <59BCE6DA.80907@free.fr> <874ls39fzi.fsf@gmail.com> Mime-Version: 1.0 Content-Type: text/html; charset=windows-1252 Content-Transfer-Encoding: 7bit Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:56516) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dt989-0005IC-53 for emacs-orgmode@gnu.org; Sat, 16 Sep 2017 05:11:17 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1dt988-0008PV-BK for emacs-orgmode@gnu.org; Sat, 16 Sep 2017 05:11:17 -0400 Received: from smtp2-g21.free.fr ([2a01:e0c:1:1599::11]:57086) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1dt988-0008OG-5x for emacs-orgmode@gnu.org; Sat, 16 Sep 2017 05:11:16 -0400 Received: from [IPv6:2a01:e35:2e21:def0:351e:772c:a55d:35db] (unknown [IPv6:2a01:e35:2e21:def0:351e:772c:a55d:35db]) by smtp2-g21.free.fr (Postfix) with ESMTP id 4C3BB2003AE for ; Sat, 16 Sep 2017 11:11:15 +0200 (CEST) In-Reply-To: <874ls39fzi.fsf@gmail.com> 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" To: "emacs-orgmode@gnu.org >> Org Mode"
You still need to explicitly call twoSum(), and that cannot be hidden.


On 16/09/2017 10:58, Amos Bird wrote:

Ok, i get the idea. So how can I customized the default code expansion so that it can directly evaluate this

class Solution {
public:
  vector<int> twoSum(vector<int>& nums, int target) {

  }
};