cpptcl library for ns2

源代码在线查看: example7.cc

软件大小: 30 K
上传用户: haowfei
关键词: library cpptcl for ns2
下载地址: 免注册下载 普通下载 VIP

相关代码

				// example7.cc								#include "cpptcl.h"								using namespace Tcl;								int sumAll(object const &argv)				{				     interpreter i(argv.get_interp(), false);								     int sum = 0;								     size_t argc = argv.length(i);				     for (size_t indx = 0; indx != argc; ++indx)				     {				          object o(argv.at(i, indx));				          sum += o.get(i);				     }								     return sum;				}								CPPTCL_MODULE(Mymodule, i)				{				     i.def("sum", sumAll, variadic());				}							

相关资源