mirror of
https://github.com/boostorg/python.git
synced 2026-01-22 05:22:45 +00:00
Tutorials...
[SVN r15818]
This commit is contained in:
17
example/tutorial/hello.cpp
Normal file
17
example/tutorial/hello.cpp
Normal file
@@ -0,0 +1,17 @@
|
||||
// Hello World Example from the tutorial
|
||||
// [Joel de Guzman 10/9/2002]
|
||||
|
||||
char const* greet()
|
||||
{
|
||||
return "hello, world";
|
||||
}
|
||||
|
||||
#include <boost/python/module.hpp>
|
||||
#include <boost/python/def.hpp>
|
||||
using namespace boost::python;
|
||||
|
||||
BOOST_PYTHON_MODULE(hello)
|
||||
{
|
||||
def("greet", greet);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user