#+OPTIONS: latex:t toc:nil H:3 Hmm, is it possible to customize babel's c++ backend to achieve this? I may also want a evaluation that submits the code to online judge and returns the result. Thierry Banel writes: > 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 twoSum(vector& nums, int target) { > > } > }; -- Amos Bird amosbird@gmail.com