chaiscript cpp - Posted on Mar 27, 2024 - See https://chaiscript.com - Logs Home - d0009
chaiscript c++
chaiscript is a scripting language for c++.
Using chaiscript class
chai-class.chai
class fizz_box
{
auto value
def fizz_box(val)
{
this.value = val
}
def get()
{
return this.value
}
}
class buzz_box
{
auto value
def buzz_box(val)
{
this.value = fizz_box(val)
}
def get()
{
return this.value.get()
}
def print()
{
print("value is " + to_string(this.get()))
}
}
auto box = buzz_box(123)
box.print()
const std::string greeting = "Cheers, c++!";
std::cout << greeting << std::endl;
std::cout << greeting.data() << std::endl;
caught:
=================================== # The c++ programming language. # # # # Join c++ # # Deck # ===================================