7a1e96719c267f991ec4345f24d73b3540d8be92 — Ihor Radchenko 6 days ago 9a082fc
ob-doc-C.org: Document multiple includes

* org-contrib/babel/languages/ob-doc-C.org (Including multiple
libraries): Show an example of multiple libraries to be included using
:includes header argument.
1 files changed, 24 insertions(+), 0 deletions(-)

M org-contrib/babel/languages/ob-doc-C.org
M org-contrib/babel/languages/ob-doc-C.org => org-contrib/babel/languages/ob-doc-C.org +24 -0
@@ 232,6 232,30 @@ yields this result (type =C-c C-c= in the source block):
#+results: d-hello
Hello World!

** Including multiple libraries
:ID:       048c4b93-3891-4a05-8cf5-1b055829f4db

When several libraries need to be included, =:includes= value should be set to a list:

#+name: cpp-multiple-includes
#+begin_src C++ :includes '(<iostream> <stdio.h>) :results output :exports results
  std::cout<<"Hello World!\n";
  printf("%d\n", 2+2);

,#+begin_src C++ :includes '(<iostream> <stdio.h>) :results output
  std::cout<<"Hello World!\n";
  printf("%d\n", 2+2);

#+RESULTS: cpp-multiple-includes
: Hello World!
: 4

** Note that:
- if no =main()= is declared, a trivial one is automatically provided,
- there is no directive like: