最近从windows 移植程序的时候发现to_string()函数在linux 中不能用,网上找了几种方法,觉得使用stringstream对象来实现类型转化比较好一点. 你只需在你工程中加入下面的to_sting()函数,就不需要修改你原程序了.(这篇只是本人移植工程时的心得,高手绕过!) /* * to_string.cpp * Created on: 2014年9月11日 * Author: tursunjan * linux int to string */ #include<iostr
说明:采用的是Multi-Byte Character Set,不支持Unicode. Peer2PeerData.h #ifndef _PEER_2_PEER_DATA_H #define _PEER_2_PEER_DATA_H #include <cstring> /* unsigned long long */ typedef unsigned long long ULLong; #define ELAPSEDSECONDS 10000000 #define ADAYTOTALSECON