newmerce的个人博客分享 http://blog.sciencenet.cn/u/newmerce

博文

按标题搜索
install wxWidgets 2.94 on ubuntu 12.04 LTS
2012-12-15 16:40
We need install OpenGL sudo apt-get install freeglut3-dev
个人分类: C/C++|3195 次阅读|没有评论
A full example usage for tbb::blocked_range2d with comments
2012-11-22 11:13
#include iostream #include opencv2/opencv.hpp #include tbb/tbb.h using namespace std; using namespace cv; using namespace tbb; const size_t L = 150; const size_t M = 225; const size_t N = 300; class MatrixMultiplyBody2D { const float (*my_a) ; const float ...
个人分类: C/C++|5364 次阅读|没有评论
Understanding Lambda-Capture (理解lamda捕获含义)
2012-11-18 11:17
Symbol Indicates Capture as specified: identifiers prefixed by are captured by reference; other identifiers are captured by copy. An up-level reference to any variable not explicitly listed is an error Capture by reference: an up-level reference implicitly capt ...
个人分类: C/C++|2950 次阅读|没有评论
不能将参数 1 从“const char *”转换为“LPCWSTR“的解决办法
2012-11-18 05:35
Configuration: Change the character set: form useUnicode character setto use multibyte character set.
个人分类: C/C++|7132 次阅读|没有评论
generate mutiple vc++ static library pdb files
2012-11-17 21:30
1.c/c++$\dashrightarrow$output file$\dashrightarrow$program database filename $\dashrightarrow$:\$(ProjectName).pdb. this configuration can generates pdb file with same filename as lib file. 2.usage: just copy \$(ProjectName).pdb and \$(ProjectName).lib to lib file. 3:Caution: The lib project an ...
个人分类: C/C++|2829 次阅读|没有评论
program slice for CPU byte order judgement
2012-11-17 12:34
struct { char low:4; char high:4; }val; char vbyte; val.low = 0x1; val.high =0x2; vbyte = *(char *)val; if(vbyte ==0x12) cout "big endian" endl; if(vbyte ==0x21) cout "small endian" endl;
个人分类: C/C++|2104 次阅读|没有评论
vc++ version wait(int nsecond)
2012-11-17 12:19
#include time.h void wait(int nsecond) { clock_t endwait; endwait = clock () +nsecond* CLOCKS_PER_SEC ; while (clock() endwait) {} }
个人分类: C/C++|2103 次阅读|没有评论
A template converting number type to string in C++
2012-10-25 22:43
// usage: // string str = toStringdouble (10.0); templatetypename T std::string toString(const T inType) { std::stringstream retStr; retStr inType; return retStr.str(); }
个人分类: C/C++|2089 次阅读|没有评论

Archiver|手机版|科学网 ( 京ICP备07017567号-12 )

GMT+8, 2024-4-28 13:11

Powered by ScienceNet.cn

Copyright © 2007- 中国科学报社

返回顶部