![](https://img-blog.csdnimg.cn/20201014180756738.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
C/C++
文章平均质量分 71
月下荷
宁静以致远
展开
-
矩阵的逆
// Function name : matrixInvert // Description : resolve the invert of the matrix, // the size of matrix is N*N // Return type : int // Argument : int N // Argument : do原创 2013-03-18 10:22:33 · 621 阅读 · 0 评论 -
笔试回顾
笔试题目分析: #include #include int main( int argc, char *argv[] ) { std::vector v; v.push_back(1); v.push_back(2); v.push_back(3); std::cout << sizeof(v) << std::endl; return 0; } 代码当时是原创 2013-10-19 22:49:46 · 438 阅读 · 0 评论 -
&&逻辑运算符的汇编代码
今天去参加了一个笔试,考试的语言是C语言.下面是一个题目的内容,大致是这样的. #include int main( int argc, char *argv[] ) { int a = 7; int b = 10; int c = 19; c = a && b; printf( "%d.\n", c ); } 问的是这个打印多少,以前一直没有关心过&&表达式的值.只原创 2013-09-14 00:02:42 · 1477 阅读 · 0 评论 -
MeyersCounting
#ifndef MEYERSCOUNTING_H_ #define MEYERSCOUNTING_H_ template class ObjectCounter { private: static size_t count; protected: ObjectCounter() { ++ObjectCounter::count; } ObjectCounter( const Ob原创 2013-09-09 21:59:46 · 641 阅读 · 0 评论 -
模板Policy
Policy用来制定算法采取的策略,使用Policy可以是的算法的策略可以修改,控制粒度更加的小。 #ifndef TRAIT_H_ #define TRAIT_H_ /* template T accumulate( const T *begin, const T *end ) { T total = T(); while ( begin != end ) {原创 2013-09-09 17:36:05 · 684 阅读 · 0 评论 -
模板的Traits
Traits含义就是特性,应用Trait模板参数,使得我们的程序既保持灵活性,同时减少类型参数的数量。能够使得我们对函数进行更加细粒度的控制。 #ifndef TRAIT_H_ #define TRAIT_H_ /* template T accumulate( const T *begin, const T *end ) { T total = T(); while ( be原创 2013-09-09 17:16:04 · 1234 阅读 · 0 评论 -
数据结构之线性表链式存储
#ifndef DS_BASE_H_ #define DS_BASE_H_ #define OK 0 #define ERROR 1 #define MEMERROR 2 #define PARAMERROR 3 typedef int BOOL; #define TRUE 1 #define FALSE 0 #define NULL 0 #endif #ifndef LINKL原创 2013-08-26 19:46:00 · 641 阅读 · 0 评论 -
OpenGL
#include "gl\glut.h" #include "Windows.h" #include "stdlib.h" void display(void) { int i,arr[625],randx; float x,y; glClearColor(0.0,0.0,0.0,0.0); glClear(GL_COLOR_BUFFER_BIT); glPointSize(1原创 2013-06-26 18:15:04 · 462 阅读 · 0 评论 -
DLL如何使用
两种LIB文件: 一种是LIB包含了函数所在的DLL文件和文件中函数位置的信息(入口),代码由运行时加载在进程空间中的DLL提供,称为动态链接库dynamic link library。 一种是LIB包含函数代码本身,在编译时直接将代码加入程序当中,称为静态链接库static link library。 三种链接方式: 编译时动态链接,允许可执行模块(.dll文件或.exe文件)仅包含在编翻译 2013-05-15 18:25:05 · 2028 阅读 · 0 评论 -
GDAL影像合并
// merge.cpp : 定义控制台应用程序的入口点。 // #include "stdafx.h" #include "../3dparty/include/gdal_priv.h" #include "../3dparty/include/gdal_alg.h" #include "../3dparty/include/gdalwarper.h" #include #ifdef原创 2013-05-07 10:54:36 · 6327 阅读 · 9 评论 -
GNU科学计算函数库 GSL - GNU Scientific Library
GNU科学计算函数库GSL(GNU Scientific Library)是一个强大的C/C++数值计算函数库,它是一个自由软件,是GNU项目软件的一个部分,遵循GPL协议。目前GSL的最新版本是1.5,发布于2004年6月25日。 常见的LINUX发行版一般不带GSL,用户可以下载安装,安装比较简单,只要按照安装说明安装即可。 函数库提供了大量的数值计算程序,如随机函数、特殊函数和拟原创 2013-03-27 09:44:26 · 1934 阅读 · 0 评论 -
鼠标单击和双击处理
/**************************************************************************** * =========================================================================== * * 文件名: mousehandle.h * 描述: * * 版本: 1.0 *原创 2013-04-08 09:15:03 · 691 阅读 · 0 评论 -
动态改变CComboBox的下拉列表的长度和宽度
static void set_DropDownHight(CComboBox& box, UINT LinesToDisplay); static void set_DropDownWidth(CComboBox& box);void CComboBoxTestDlg::set_DropDownHight(CComboBox& box, UINT LinesToDisplay) { ASSE原创 2013-03-22 18:27:15 · 5575 阅读 · 2 评论 -
有限自动状态机
#include #include #include #include namespace msm = boost::msm; namespace mpl = boost::mpl; using namespace msm::front; // events struct coin {}; struct push {}; // front-end原创 2015-05-27 09:56:43 · 1068 阅读 · 0 评论