- 博客(21)
- 资源 (8)
- 收藏
- 关注
转载 利用ADO操作Excel文件
http://blog.youkuaiyun.com/tabby/article/details/1889217今天花时间研究了一下ADO操作Excel文件的问题,跟大家分享一下:首先利用Excel2003创建了一个名为Demo.xls的文件,内容如下:NameAgeTY12TZL15然后打开V
2014-04-11 09:37:05
2112
转载 C++读写EXCEL文件方式比较
zhttp://blog.youkuaiyun.com/fullsail/article/details/4067416因为有些朋友问代码的问题,将OLE读写的代码分享在这个地方,大家请自己看。 http://blog.youkuaiyun.com/fullsail/article/details/8449448C++读取Excel的XLS文件的方法有很多,但是也许就是因为方法
2014-04-11 08:52:56
1006
原创 多线程例子
// linethread.cpp : 定义控制台应用程序的入口点。//#include "stdafx.h"#include #include using namespace std;int index = 0;HANDLE hmutex;DWORD WINAPI FUN1(LPVOID lpParameter){ int i=0; while (true) {
2014-02-25 14:36:56
806
原创 OPENCV 两点之间的操作
#include #include #include #include "cxcore.h" #include #include using namespace std;#pragma onceclass calTwoPoint{public: calTwoPoint(CvPoint pointO,CvPoint pointA); ~calTwoPoint(
2014-02-18 11:22:11
12618
原创 判断一点是否在矩形中,已知矩形的顶点坐标
#include #include #include #include "Point.h"using namespace std;#pragma onceclass eleRect{public: eleRect(vector & rect, int index = 0); ~eleRect(void); bool if_in_quadrilat(CPoint po
2014-02-18 10:59:42
1383
原创 求两直线交点
crossPoint.h#include #include #include #include "cxcore.h" #include #include using namespace std;#pragma oncetypedef struct _Line { CvPoint p1,p2; double a,b,c;
2014-02-18 10:55:19
1009
原创 opencv 颜色识别
int whetherYellow(CvScalar temp, int T) { if (((temp.val[2] - temp.val[0]) > T) && ((temp.val[1] - temp.val[0])> T)) { return 1; } return 0; } int whetherRed(CvScalar temp
2014-02-14 12:01:29
1492
原创 获取两点之间的距离
/************************************************************************ *函数名: getDistance * *函数作用: 获取两点之间的距离 * *函数参数: *CvPoint2D32f pointO - 起点 *CvPoint2D32f pointA - 终点 * *函数
2014-02-14 11:59:00
8951
转载 for_each如何调用全局的和类的成员函数举例
转自 http://hi.baidu.com/xmuwubo/item/0dc94409b01a67c9905718f3#include "StdAfx.h"#include #include #include #include using namespace std;void printInt(int i){ cout <<i <<endl;}class CAdd{
2014-02-12 15:43:55
919
转载 STL中的list容器的一点总结
转自 http://www.cnblogs.com/BeyondAnyTime/archive/2012/08/10/2631191.htmlSTL中的list容器的一点总结1.关于list容器list是一种序列式容器。list容器完成的功能实际上和数据结构中的双向链表是极其相似的,list中的数据元素是通过链表指针串连成逻辑意义上的线性表,也就是list也具有链表的主
2014-01-26 14:03:33
718
原创 已知两点获取单位向量 和 单位垂直向量
根据两点获取单位向量 和 垂直单位向量/*************************************************************************函数名: getUnitVector**函数作用: 根据两点获取单位向量**函数参数:*CvPoint pointO - 起点*CvPoint pointA - 终
2014-01-26 11:43:05
7473
原创 已知2个坐标点,求从 0------->x 逆时针需旋转多少角度到该位置
/************************************************************************ *函数名: getAngle * *函数作用: 已知2个坐标点,求从 0------->x 逆时针需旋转多少角度到该位置 * * | * |
2014-01-26 10:55:03
1115
转载 list 容器 排序函数
点击打开链接list 容器 排序函数struct Point{ double x,y,z;}; 制定排序规则,重载()运算符: (一) 按x值的大小 进行升序排序 class ascend_x{public: bool operator()(const Point &t1,Point &t2) {return t
2014-01-26 10:22:23
941
转载 Struct和Class的区别
转载来源:http://blog.sina.com.cn/s/blog_48f587a80100k630.htmlC++中的struct对C中的struct进行了扩充,它已经不再只是一个包含不同数据类型的数据结构了,它已经获取了太多的功能。struct能包含成员函数吗? 能!struct能继承吗? 能!!struct能实现多态吗? 能!!! 既然这些它都
2014-01-24 16:38:47
668
原创 虚函数实现多态的使用例子
#include "StdAfx.h" #include #include #include #include #include using namespace std;class student{public: char * name; bool female; int age; student(); student(char * nam
2014-01-24 14:45:44
860
原创 struct 重载 和 继承 的使用例子
#include "StdAfx.h"#include #include using namespace std;typedef struct _CPoint { int x; int y; _CPoint (); _CPoint (int a,int b); _CPoint operator + (_CPoint point); _CPoint opera
2014-01-24 13:50:42
841
原创 vector 的使用例子
#include "StdAfx.h"#include #include using namespace std;typedef vector :: iterator vIntIndex;int main(void){ vector arr; int a[] = {0,1,8}; array_num(arr,a,3); vIntIndex index; index
2014-01-22 10:23:08
941
转载 求两直线交点
http://blog.youkuaiyun.com/yangtrees/article/details/7965983struct Line { CvPoint p1,p2; double a,b,c; }; void GetLinePara(Line &l) { l.a=l.p1.y-l.p2.y; l.b=l.p2.x-l.p1.x; l.c=l.p
2014-01-08 18:02:31
972
原创 已知旋转中心和旋转角度,获得旋转之后的一组点坐标
//已知旋转中心和旋转角度,获得旋转之后的一组点坐标bool rotPoint(CPoint center,float rotAngleNow,CPoint src_corners[],CPoint dst_corners[],int num){ float reverseH[6]; float x = (float) (cos (rotAngleNow * PI / 180.));
2013-12-26 10:13:34
6173
1
原创 socket 套接字TCP MAKEWORD( 1, 1 ),MAKEWORD( 2, 2 ) 两个版本的
#include "StdAfx.h"#include #include #pragma comment( lib, "ws2_32.lib" )class socket264{public: socket264(); ~socket264(); bool recv264(char buf[50]); bool send264(char * sendBuffer);pr
2013-12-13 11:54:33
5407
原创 带有汉字的字符串与ASCII码相互转换
//带有汉字的字符串与ASCII码相互转换class AsciiTranslation{public: AsciiTranslation(); ~AsciiTranslation(); char * getAscii(char * input); char * AsciitoNum(char * input);private:};AsciiTranslation :: Asci
2013-12-10 10:10:53
1838
基于opencv的道路车道线检测
2014-01-10
opencv实现显示摄像头视频
2013-11-25
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人