example2.cc
来自「cpptcl library for ns2」· CC 代码 · 共 24 行
CC
24 行
// example2.cc#include "cpptcl.h"#include <iostream>#include <string>using namespace std;using namespace Tcl;void hello(){ cout << "Hello C++/Tcl!" << endl;}int main(){ interpreter i; i.def("hello", hello); string script = "for {set i 0} {$i != 4} {incr i} { hello }"; i.eval(script);}
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?