码迷,mamicode.com
首页 >  
搜索关键字:quickfix cpp    ( 13195个结果
Windows 和 Linux下使用socket下载网页页面内容(可设置接收/发送超时)的代码
主要难点在于设置recv()与send()的超时时间,具体要注意的事项,请看代码注释部分,下面是代码:[cpp]view plaincopyprint?#include#include#include#include#include#include#ifdef_WIN32///包含winsocket...
分类:Windows程序   时间:2014-06-26 00:05:52    阅读次数:491
【来写个2048吧】—— 后期优化及源代码
卡片里的数字假设越来越大则会超过卡片,这样看起来不好看,所以我们要推断数字的位数然后设置合适的大小。在Card.cpp的setNumber()中增加例如以下代码 //设置数字大小 if ( num >= 0) { labelC...
分类:其他好文   时间:2014-06-25 23:34:03    阅读次数:269
第二讲 auto_ptr智能指针
// STL.cpp : 定义控制台应用程序的入口点。////智能指针在其生命周期结束后会自动调用delete#include "stdafx.h"#include#includeusing namespace std;class WebSite{public: WebSite(int x){...
分类:其他好文   时间:2014-06-25 20:09:38    阅读次数:216
cocos2dx动画Animation介绍
??一、帧动画你能够通过一系列图片文件,像例如以下这样,创建一个动画:[cpp] CCAnimation *animation = CCAnimation::create(); //从本地文件系统中载入图片文件到CCSpriteFrame中区,然后加入到CCAnimation中 for (int i...
分类:其他好文   时间:2014-06-25 16:53:17    阅读次数:243
深入理解互斥锁的实现
在实际的软件编程中,经常会遇到资源的争用,比如下面的例子: [cpp] view plaincopyprint? class Counter { private: int value; public: Counter(int c) { value = c; } int GetAndIncrement() { int temp = value; //进入危险区 valu...
分类:其他好文   时间:2014-06-24 23:51:10    阅读次数:400
神经网络caffe框架源码解析--softmax_layer.cpp类代码研究
// Copyright 2013 Yangqing Jia // #include #include #include "caffe/layer.hpp" #include "caffe/vision_layers.hpp" #include "caffe/util/math_functions.hpp" using std::max; namespace caffe { /**...
分类:其他好文   时间:2014-06-24 19:34:27    阅读次数:347
非MFC的DLL中使用CString类
1.头文件添加 /* 非MFC DLL中使用CString */ #define _AFXDLL #include 注意:要定义在 #include之前,否则会报错 2.cpp 文件中添加  /* 非MFC DLL中使用CString */ // The following symbol used to force inclusion of this modul...
分类:其他好文   时间:2014-06-22 21:33:01    阅读次数:229
图的深度优先搜索 递归和非递归实现 c++版本
本文参考了李春葆版本的数据结构上机指导,但是原版是c代码, 本文用了c++实现,并且修复了深度优先搜索非递归的一个bug。 graph.cpp文件: #include"graph.h" #include #include int visited[MAXV]; MGraph::MGraph(int A[100][10],int nn,int ee) { e=ee; n=nn;...
分类:编程语言   时间:2014-06-22 19:37:23    阅读次数:655
大一C语言结课设计之《简单计算器》
/*===============================================*** 设计目的:简单计算器,计算形如10*(20.2-30.6)+5.0/2的表达式值 ** 简要原理:中缀式转逆波兰式(后缀式) ** IDE:Dev-Cpp 4.9.9.2 ** 注意事项:括号必须是英文状态的 ** 时间: 2014-6-17 \*====================...
分类:编程语言   时间:2014-06-22 18:48:27    阅读次数:260
g++基本用法
用法:g++[选项]文件... g++编译流程:      [cpp] view plaincopyprint? main.cxx  #include      using namespace std;    int main(void)  {          cout"Hello World!"        return 0;  }   m...
分类:其他好文   时间:2014-06-22 00:48:48    阅读次数:214
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!