由买买提看人间百态

boards

本页内容为未名空间相应帖子的节选和存档,一周内的贴子最多显示50字,超过一周显示500字 访问原贴
Programming版 - [转载] Tcl/C++ question
相关主题
问问开发ios的,有用C++来组织代码的么?c++ interview: iterator 和 pointer区别?
C++ class cross reference problemC++ Q11: iterator
请教一个C++问题C++ vector 一边遍历一边删
请教一个编程问题C++ syntax question
请教pythonC++ 菜鸟问一个关于template 的问题。
一个C++的概念问题问一个C++ set和unordered_set iterator的问题
呼唤大侠们,我实在不能实现C++泛型的精神。[合集] C++ question -- how to save objects
stl 的 member type 看起来挺头大的C, C++, Java, C#, Objective-C,
相关话题的讨论汇总
话题: tcl话题: c++话题: objects话题: iteration话题: question
进入Programming版参与讨论
1 (共1页)
a***e
发帖数: 1140
1
【 以下文字转载自 Linux 讨论区 】
【 原文由 agare 所发表 】
I have a program. Let Tcl do iteration.
In the iteration body, it calls C++ modules.
The question is:
in C++ modules, it creates objects, how can I keep these objects alive
after the call finished. So for the next iteration, these objects are still
available.
a***e
发帖数: 1140
2
No one knows?
I hear that using "Tcl_IncrRefCount" can do this. But the problem is:
The manual says it need a new "Tcl_Obj*" first. I don't know how to
hook my objects to this "Tcl_Obj". It seems Tcl only have very few
predefined objects (int,string,list). How to deal with non-defined
objects?
I tried, but failed.

【在 a***e 的大作中提到】
: 【 以下文字转载自 Linux 讨论区 】
: 【 原文由 agare 所发表 】
: I have a program. Let Tcl do iteration.
: In the iteration body, it calls C++ modules.
: The question is:
: in C++ modules, it creates objects, how can I keep these objects alive
: after the call finished. So for the next iteration, these objects are still
: available.

1 (共1页)
进入Programming版参与讨论
相关主题
C, C++, Java, C#, Objective-C,请教python
c++ private 问题一个C++的概念问题
谁能说说Perl, Python, Tcl各自的优缺点?主要应用场合?呼唤大侠们,我实在不能实现C++泛型的精神。
程序员薪水stl 的 member type 看起来挺头大的
问问开发ios的,有用C++来组织代码的么?c++ interview: iterator 和 pointer区别?
C++ class cross reference problemC++ Q11: iterator
请教一个C++问题C++ vector 一边遍历一边删
请教一个编程问题C++ syntax question
相关话题的讨论汇总
话题: tcl话题: c++话题: objects话题: iteration话题: question