- 浏览: 228278 次
- 性别:
- 来自: 杭州
最新评论
文章列表
<p>今天遇到一个难题,python要调用c++一个函数</p>
<p>c++函数是可变长的变量如add(int cmd,...)</p>
<p>然后再c++中使用va_list取得变长参数。</p>
<p>那么python 该如何调用该函数呢。弄了半天也没有发现boost.python如何支持该类型的参数。</p>
<p>后来一想,python dict不是就是可变长的参数吗,里边放什么都可以。</p>
<p>那么问题就转化问如何传递dict给c++。</p ...
- 2011-04-29 13:50
- 浏览 1429
- 评论(0)
<p>1.gdb (运行程序名称)</p>
<p>例如</p>
<p>gdb cbenchmark</p>
<p></p>
<p>2.设置运行参数</p>
<p>set args -c 1 -n 1 -F ./libaliww.so -l 1</p>
<p></p>
<p>3.如果是多线程程序</p>
<p>set follow-fork-mode child</p>
<p&g ...
- 2011-04-27 18:18
- 浏览 1184
- 评论(0)
<p>1.gdb (运行程序名称)</p>
<p>例如</p>
<p>gdb cbenchmark</p>
<p></p>
<p>2.设置运行参数</p>
<p>set args -c 1 -n 1 -F ./libaliww.so -l 1</p>
<p></p>
<p>3.如果是多线程程序</p>
<p>set follow-fork-mode child</p>
<p&g ...
- 2011-04-27 18:18
- 浏览 991
- 评论(0)
<p>1.gdb (运行程序名称)</p>
<p>例如</p>
<p>gdb cbenchmark</p>
<p></p>
<p>2.设置运行参数</p>
<p>set args -c 1 -n 1 -F ./libaliww.so -l 1</p>
<p></p>
<p>3.如果是多线程程序</p>
<p>set follow-fork-mode child</p>
<p&g ...
- 2011-04-27 18:18
- 浏览 1126
- 评论(0)
<p>ulimit -a</p>
<p>查看当前ulimit状况</p>
<p>ulimit -c unlimited</p>
<p>设置core不限制size</p>
<p>ulimit -a</p>
<p>会看到core file size限制如下unlimited</p>
<p>core file size (blocks, -c) unlimited<br>
data seg size (kbytes, -d) unlim ...
- 2011-04-27 18:12
- 浏览 992
- 评论(0)
<p>ulimit -a</p>
<p>查看当前ulimit状况</p>
<p>ulimit -c unlimited</p>
<p>设置core不限制size</p>
<p>ulimit -a</p>
<p>会看到core file size限制如下unlimited</p>
<p>core file size (blocks, -c) unlimited<br>
data seg size (kbytes, -d) unlim ...
- 2011-04-27 18:12
- 浏览 803
- 评论(0)
<p>ulimit -a</p>
<p>查看当前ulimit状况</p>
<p>ulimit -c unlimited</p>
<p>设置core不限制size</p>
<p>ulimit -a</p>
<p>会看到core file size限制如下unlimited</p>
<p>core file size (blocks, -c) unlimited<br>
data seg size (kbytes, -d) unlim ...
- 2011-04-27 18:12
- 浏览 1090
- 评论(0)
<p><strong>C++代码如下:src.cpp</strong>
</p>
<p>#include <iostream><br>
#include <string><br>
#include <map><br>
#include <vector><br><br>
using namespace std;<br><br>
typedef m ...
- 2011-04-21 13:07
- 浏览 1004
- 评论(0)
<p><strong>C++代码如下:src.cpp</strong>
</p>
<p>#include <iostream><br>
#include <string><br>
#include <map><br>
#include <vector><br><br>
using namespace std;<br><br>
typedef m ...
- 2011-04-21 13:07
- 浏览 975
- 评论(0)
<p><strong>C++代码如下:src.cpp</strong>
</p>
<p>#include <iostream><br>
#include <string><br>
#include <map><br>
#include <vector><br><br>
using namespace std;<br><br>
typedef m ...
- 2011-04-21 13:07
- 浏览 771
- 评论(0)
<p><strong>c++代码:src.cpp</strong>
</p>
<p>#include <string><br>
struct World<br>
{<br>
World(std::string a_msg) : msg(a_msg) {}<br>
std::string greet() const { return msg; }<br>
std::string msg;<br>
};<br><br& ...
- 2011-04-14 19:13
- 浏览 863
- 评论(0)
<p><strong>c++代码:src.cpp</strong>
</p>
<p>#include <string><br>
struct World<br>
{<br>
World(std::string a_msg) : msg(a_msg) {}<br>
std::string greet() const { return msg; }<br>
std::string msg;<br>
};<br><br& ...
- 2011-04-14 19:13
- 浏览 1221
- 评论(0)
<p><strong>c++代码:src.cpp</strong>
</p>
<p>#include <string><br>
struct World<br>
{<br>
World(std::string a_msg) : msg(a_msg) {}<br>
std::string greet() const { return msg; }<br>
std::string msg;<br>
};<br><br& ...
- 2011-04-14 19:13
- 浏览 786
- 评论(0)
<p><strong>c++源码:src.cpp</strong>
</p>
<p>#include <vector><br><br>
typedef std::vector<double> dvec;<br><br>
dvec A()<br>
{<br>
dvec vec;<br>
vec.push_back(1.0);<br>
return vec;<br>
}&l ...
- 2011-04-14 18:59
- 浏览 832
- 评论(0)
<p><strong>c++源码:src.cpp</strong>
</p>
<p>#include <vector><br><br>
typedef std::vector<double> dvec;<br><br>
dvec A()<br>
{<br>
dvec vec;<br>
vec.push_back(1.0);<br>
return vec;<br>
}&l ...
- 2011-04-14 18:59
- 浏览 821
- 评论(0)