CodeBlocks add include directory

25服务器出现的问题 http://blog.csdn.net/testcs_dn/article/details/8674135

目前可能是由于 KMS无法激活导致的,然后正在收集数据一直等待,也没办法删除远程服务角色,因此25现在还是 无法远程连接

python xrange 和 range区别:
xrange 不生成list 效率高,
range效率低

如果for里面 需要访问整个序列,则必须range, 否则xrange提高效率

C++ 强制类型转换,如果变换类型,例如char -> int, 那么要用reinterprete_cast, 例如char*

char* p;
int* p=reinterpret_cast<int*>(p);

static_cast则不行

另外关于结构体占用字节数,可以有按照4字节对齐,以及按照1字节对齐两种

http://tehsausage.com/mingw-to-string 这个目录指出了MinGW GCC的 问题所在,to_string的问题,但是按照里面patch替换原来的库,发现还是没有解决问题

暂时还是添加了这个函数来实现

#include<sstream>
template <typename T>
std::string to_string(T value)
{
  //create an output string stream
  std::ostringstream os ;

  //throw the value into the string stream
  os << value ;

  //convert the string stream into a string and return
  return os.str() ;
}

今天学弟问到CB怎么添加第三方库的目录,找到解决方案

http://bbs.csdn.net/topics/330085695

project — build options — search directory —- compiler 自行添加一个相对或者绝对路径就好了

Eigen是一个C++版的数学库
http://eigen.tuxfamily.org/index.php?title=Main_Page

Richael Zhang
http://blog.csdn.net/abcjennifer/article/details/7781936

的测试代码

Posted by richard爱闹 - 4月 9 2015
如需转载,请注明: 本文来自 Richard