经常会在项目中用到 int to string
#include
#include
#include
using namespace std;
int main(void)
{
ostringstream num;
num << 123;
string str = num.str();
cout << str << endl;
return 0;
}...
分类:
编程语言 时间:
2014-07-22 23:04:54
阅读次数:
283
char s[maxn];
int sa[maxn];
int t[maxn], t2[maxn], c[maxn];
int rank[maxn], height[maxn];
int n;
void build_sa(int m)
{
int i, *x = t, *y = t2;
for(i = 0; i < m; i++)
c[i] = 0;
for(i = 0; i < n; ...
分类:
其他好文 时间:
2014-07-22 23:04:34
阅读次数:
293
[源码编译]
前期准备:
确认电脑上安装好g++等开发环境,否则执行
sudo apt-get install build-essential
2. 确认电脑上已经安装好svn以便下载最新的源代码,否则执行
sudo apt-get install subversion
3. 确保proj4的安装
$ curl -O...
分类:
系统相关 时间:
2014-07-22 23:02:53
阅读次数:
2542
ubuntu安装opencv(1)安装编译opencv的环境sudo apt-get -y
install build-essential cmake pkg-config(2)安装Image I/O库sudo apt-get -y install
libjpeg62-dev sudo apt-ge...
分类:
其他好文 时间:
2014-05-01 22:42:45
阅读次数:
451
Keyboard inputPython provides a build-in
function called raw_input (in version 2.x) that gets input from the keyboard. In
Python 3.x we use input(). W...
分类:
其他好文 时间:
2014-05-01 19:23:26
阅读次数:
392
问题描述:
在Eclipse中运行ant批量打包工具出错,日志信息如下:
D:\Android\android-sdk-windows\tools\ant\build.xml:601: The following error occurred
while executing this line:
D:\Android\android-sdk-windows\tools\ant\bui...
分类:
移动开发 时间:
2014-04-30 22:48:39
阅读次数:
359
类似java的多行注释!
安装过程:
1.前往GitHub下载工程文件:VVDocumenter-Xcode
2.用Xcode打开工程,Command + B
Build成功后,可以在~/Library/Application Support/Developer/Shared/Xcode/Plug-ins目录下看到生成的xcplugin文件:
...
分类:
其他好文 时间:
2014-04-30 22:46:38
阅读次数:
304
问题描述:
在sublime text里写最简单的python语句hello world:
print ('hello world')
回车build后出错如下图:
解决办法:
这个问题的原因说起来很幼稚,就是因为没有保存文件。所...
分类:
其他好文 时间:
2014-04-30 22:16:38
阅读次数:
344
C++ 中构造函数可否是虚函数?
绝不要!!
而且,在构造函数中调用虚函数也是不提倡的行为,因为会引发预想不到的结果。
因为,在 derived class 对象构造的过程中,首先调用的是基类的构造函数,等基类构造结束,才开始构造派生类的部分。
这个过程中,编译器将该对象视为 基类,而非派生类(因为,派生类对象的专属部分还未初始化!!!)
所以,如果在构造函数中调...
分类:
编程语言 时间:
2014-04-29 13:47:22
阅读次数:
258
Build Tree View Structure for SharePoint List Data
将SharePoint中的数据树状显示...
分类:
其他好文 时间:
2014-04-29 13:26:20
阅读次数:
361