Skip to content

Latest commit

 

History

History
21 lines (14 loc) · 317 Bytes

File metadata and controls

21 lines (14 loc) · 317 Bytes
// Using ChaiScript is easy!

#include <chaiscript/chaicript.hpp>

std::string helloWorld(const std::string &t_name)
{
  return "Hello " + t_name + "!";
}

int main()
{
  chaiscript::ChaiScript chai;
  chai.add(chaiscript::fun(&helloWorld), "helloWorld");

  chai.eval("puts(helloWorld(\"Bob\"));");
}