码迷,mamicode.com
首页 >  
搜索关键字:cpp    ( 13186个结果
C++ limits头文件的用法(numeric_limits)
初学C++的时候,对这个模板很陌生,不知道它到底是做什么用的,今天拿起《C++标准程序库》,出现了它的讨论,所以决定好好研究一番。1. numeric_limits是什么?(A)《C++标准程序库》:[cpp]view plaincop一般来说,数值型别的极值是一个与平台相关的特性。C++标准程序库...
分类:编程语言   时间:2014-08-13 10:26:35    阅读次数:218
C++11多线程教学(一)
本篇教学代码可在GitHub获得:https://github.com/sol-prog/threads。在之前的教学中,我展示了一些最新进的C++11语言内容:1.正则表达式(http://solarianprogrammer.com/2011/10/12/cpp-11-regex-tutoria...
分类:编程语言   时间:2014-08-13 01:02:44    阅读次数:279
C++11新特性:右值引用和转移构造函数
问题背景[cpp]view plaincopy#includeusingnamespacestd;vectordoubleValues(constvector&v){vectornew_values(v.size());for(autoitr=new_values.begin(),end_itr=n...
分类:编程语言   时间:2014-08-13 00:45:54    阅读次数:266
HDU 4941 Magical Forest STL
这明明就是给纯C选手的大杀器啊。题意:给你k坐标,表示 X,Y 有值C,有 3种操作1) 交换A,B两行2) 交换A,B两列3) 询问(A,B)的值解题思路:map离散化解题代码:// File Name: 1007.cpp// Author: darkdream// Created Time: 2...
分类:其他好文   时间:2014-08-13 00:39:44    阅读次数:259
整型变量(int)与字节数组(byte[])的相互转换
//?int2byte.cpp?:?定义控制台应用程序的入口点。 // #include?"stdafx.h" #include?<Windows.h> /* #define?MAKEWORD(a,?b) ((WORD)(((BYTE)(((DWORD_PTR)(a)) & 0xff))?|?((WORD)((BYTE)(...
分类:其他好文   时间:2014-08-12 22:20:58    阅读次数:417
opencv对图像进行边缘及角点检测
opencv对图像进行边缘及角点检测 先看结果: 代码: // ConsoleApplication1_812.cpp : Defines the entry point for the console application. // #include "stdafx.h" #include "opencv2/opencv.hpp" class Imagedetector{ ...
分类:其他好文   时间:2014-08-12 22:05:44    阅读次数:298
Cocos2d-x3.1利用ClippingNode实现标题闪亮特效
1、掌握ClippingNode的原理与使用 2、创建Cocos工程 3、在HelloWorld.cpp代码中添加如下代码: auto clip = ClippingNode::create();//创建裁剪节点 auto gameTitle = Sprite::create("game_title.png"); clip->setStencil(gameTitle);//设...
分类:其他好文   时间:2014-08-12 19:04:24    阅读次数:196
Ural 1982 Electrification Plan (prim最小生成树)
很明显的最小生成树模板题 多点生成[cpp] view plaincopy#includeusingnamespacestd;intn,k,a;intdist[120],m[120][120];boolp[120];voidprim(){for(inti=1;im[k][j])dist[j]=m[k...
分类:其他好文   时间:2014-08-12 18:49:54    阅读次数:186
MFC扩展界面库Ultimate Toolbox的编译
出现编译错误的文件:OXHTMLParser.cppOXParser.cppOXPhysicalEditEx.cppOXQuickString.cpp出错的原因乍看起来是字符串的引号不配对,实际上是因为Ultimate Toolbox的源码文件都是WINDOWS-1252编码的,且文件中包含编码是0...
分类:其他好文   时间:2014-08-12 18:45:54    阅读次数:227
vs2005 测试 lua环境
(1)添加文件核路径(2)库文件路径(3)main.cpp#include #include extern "C"{ #include #include #include }#pragma comment(lib, "lua51.lib")#pragma comment(lib, "lua5.1.....
分类:其他好文   时间:2014-08-12 18:37:14    阅读次数:172
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!