
C++
PeOS
鹏鹏要去奋斗实现梦想!
展开
-
for循环的一种加速方法
一、源码如下:#include "stdafx.h"#include "cv.h"#include "highgui.h"#include using namespace cv;using namespace std; int _tmain(int argc, _TCHAR* argv[]){ Mat srcImg = imread("D:\\Documents\\Des原创 2014-12-20 17:49:36 · 5094 阅读 · 2 评论 -
struct结构会增加程序的开销
struct结构一方面能够加强对变量的管理,增加程序的可读性,但是另一方面,结构体也会加大程序的开销。看下面一段代码:struct TEST_S{ int a; int b; float c;};int _tmain(int argc, _TCHAR* argv[]){ TEST_S ts; int a; int b; int c; ts.a = 100; ts.原创 2014-12-26 19:30:53 · 1336 阅读 · 0 评论