📄 example4.cc
字号:
// example4.cc#include "cpptcl.h"#include <string>using namespace std;using namespace Tcl;class Person{public: Person(string const &n) : name(n) {} void setName(string const &n) { name = n; } string getName() { return name; }private: string name;};CPPTCL_MODULE(Mymodule, i){ i.class_<Person>("Person", init<string const &>()) .def("setName", &Person::setName) .def("getName", &Person::getName);}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -