- 博客(35)
- 资源 (10)
- 收藏
- 关注
原创 WebApi Add standalone
WebApi XML response Add <?xml version="1.0" encoding="UTF-8" standalone="yes"?> WebApiConfig:config.Formatters.Add(newCustomXmlFormatter(){UseXmlSerializer=true});config.Formatters...
2019-09-03 17:16:38 139
转载 简单链表
C++单链表基本操作(代码) #include #include #include using namespace std; // list node structure typedef struct _NODE{ int data; struct _NODE *next; }NODE, *PNODE; // create a list,
2012-03-26 16:57:43 452
转载 对象池
对象池CTimeUtil.h#ifndef CTIMEUTIL_H#define CTIMEUTIL_H#if defined(_MSC_VER)#include #else#include #include #endiftypedef enum TIME_LEV{ MISEC_LEV, USEC_LEV};class CTimeUtil{
2012-03-26 16:48:53 453
转载 对象池
对象池/* ---------------------------------------------------------------- *//* Copyright 2005 (c) by RWTH Aachen - Lehrstuhl fuer Informatik VI *//* Richard Zens
2012-03-26 16:44:31 768
转载 对象池
smartpoint#ifndef __SMART_POINTER_H__#define __SMART_POINTER_H__template class SmartPointer{public: typedef T element_type; SmartPointer ():_object(NULL), _counter(NULL){} Sma
2012-03-26 16:38:26 435
转载 内存池
MemoryBlock.h#ifndef MEMORY_BLOCK#define MEMORY_BLOCKtypedef unsigned short USHORT;/////////////////////////////////////////////////////#include #include using namespace std;class MemoryB
2012-03-26 16:36:58 489
原创 求无需数组第K小的数及其位置
#include "stdafx.h"#include #include #include void swap(int & a, int & b);int find_position(int* a,int k, int low,int high);int find_orderk(int* a, int k, int low,int high);int MAXCOUNT = 10
2012-03-26 10:07:27 585
原创 求无序数组第K大的数值,及其所在的位置
求无序数组第K大的数值,及其所在的位置#include "stdafx.h"#include #include #include void swap(int & a, int & b);int find_position(int* a,int k, int low,int high);int find_orderk(int* a, i
2012-03-23 15:22:55 802
原创 求无序数组第K大小的数值
#include "stdafx.h"#include #include #include void swap(int & a, int & b);int find_position(int* a,int k, int low,int high);int find_orderk(int* a, int k, int low,int high);void swap(int & a
2012-03-22 16:01:56 628
原创 c++阿拉伯数字转中文字符
#include #include #include using namespace std;int getNum(){ int num; cout << "请输入一个数字:" << endl; // 从命令行输入这个浮点数 cin >> num; // 清除输入流状态标志 cin.clear(); r
2011-09-01 12:22:23 3178 2
原创 XML应用
/*****************************************************************************//** * @file CTagFile.h * @brief CTagFile クラスヘッダーファイル * * @author Yan Hongwei * @date
2009-09-18 22:42:00 638
原创 Socket封装12
#ifndef RESPONSEOPERATE_H#define RESPONSEOPERATE_H// #include // #include #include // #include "customer headers"#include "ServerSocket.h"#include "DataResponse.h"#include "Thr
2009-09-18 22:36:00 449
原创 Socket封装11
#ifndef DATARESPONSE_H#define DATARESPONSE_H// #include #include // #include // #include "customer headers"#include "Socket.h"/** * description */class DataResponse{
2009-09-18 22:34:00 443
原创 Socket封装10
#ifndef LISTENTHREAD_H#define LISTENTHREAD_H// #include // #include // #include "customer headers"#include "ServerSocket.h"#include "Thread.hpp"class ResponseThread;/**
2009-09-18 22:30:00 500
原创 Socket封装9
struct CommandHeader{ char CommandTag[4]; // 4 WORD CommandVersion; // 2 WORD CommandID; // 2 DWORD RequestID; // 4 DWORD SendTime; // 4 D
2009-09-18 22:24:00 579
原创 Socket封装8
#ifndef REQUESTOPERATE_H#define REQUESTOPERATE_H// #include // #include // #include "customer headers"#include "../sock/ClientSocket.h"#include "DataRequest.h"#include "../Thread
2009-09-18 22:21:00 551
原创 Socket封装7
#ifndef DATAREQUEST_H#define DATAREQUEST_H// #include #include #include // #include // #include "customer headers"//#include "../sock/Socket.h"#include "../SocketStruct.h"
2009-09-18 22:19:00 495
原创 Socket封装6
#ifndef SOCK_SERVERSOCKET_H#define SOCK_SERVERSOCKET_H// #include // #include // #include "customer headers"#include "Socket.h"namespace sock{ class ServerSocket : pub
2009-09-18 22:15:00 536
原创 Socket封装7
// SocketClient.cpp : Defines the entry point for the console application.//#include #include "stdafx.h"#include "ClientSocket.h"using namespace sock;int _tmain(int argc, _TCHA
2009-09-18 22:15:00 534
原创 Socket封装5
#ifndef SOCK_CLIENTSOCKET_H#define SOCK_CLIENTSOCKET_H// #include // #include // #include "customer headers"#include "Socket.h"namespace sock{ class ClientSocket : p
2009-09-18 22:14:00 367
原创 Socket封装4
// #include #include // #include #include #include // #include "customer headers"#include "Socket.h"namespace sock{ // statics#ifdef _WIN32 WSAInitial Socket::sWi
2009-09-18 22:12:00 478
原创 Socket封装3
#ifndef SOCK_SOCKET_H#define SOCK_SOCKET_H// #include #include // #include #ifdef _WIN32#include #pragma comment(lib, "Ws2_32.lib")#else#include #include #include #includ
2009-09-18 22:11:00 476
原创 Socket封装2
socket.cpp////////////////////////// #include #include // #include #include #include // #include "customer headers"#include "socket.h"namespace sock{#ifdef _WIN32 class WSAInitial { public:
2009-09-18 22:06:00 666
原创 Socket封装
socket.h//////////////////////////#ifndef SOCK_SOCKET_H_#define SOCK_SOCKET_H_// #include #include // #include #ifdef _WIN32#include #pragma comment(lib, "Ws2_32.lib")#else
2009-09-18 22:04:00 719
原创 线程类封装(4)
#ifndef THREAD_EVENT_H_#define THREAD_EVENT_H_// #include #include // #include // #include #ifdef _WIN32#include #else#include #include #endif// #include "custom head
2009-09-18 22:03:00 420
原创 线程类封装(5)
#ifndef THREAD_MUTEX_HPP_#define THREAD_MUTEX_HPP_// #include // #include #ifdef _WIN32#include WINBASEAPI BOOL WINAPITryEnterCriticalSection(LPCRITICAL_SECTION lpCriticalSection);
2009-09-18 22:03:00 441
原创 线程类封装(3)
ThreadPool.hpp #ifndef THREAD_THREADPOOL_HPP_#define THREAD_THREADPOOL_HPP_// #include #include #include // #include #include // #include // #include "custom headers"#i
2009-09-18 22:01:00 695 1
原创 线程类封装(2)
threadImpl.hpp#ifndef THREAD_THREADIMPL_HPP_#define THREAD_THREADIMPL_HPP_// #include // #include #ifdef _WIN32#include #include #else#include #include #endif// #i
2009-09-18 22:00:00 490
原创 线程类封装(1)
thread.hpp #ifndef THREAD_THREAD_HPP_#define THREAD_THREAD_HPP_// #include #include // #include // #include "customer headers"#include "threadimpl.hpp"#include "mutex.hpp"
2009-09-18 21:54:00 475
原创 ENCODE封装
#ifndef ENCODE_HPP_#define ENCODE_HPP_#pragma warning(disable: 4786)#pragma warning(disable: 4996)// #include #include // #include #ifdef _WIN32#include #endif// #include "
2009-09-18 21:53:00 432
原创 CSV文件解析
#ifndef CSVFILE_HPP_#define CSVFILE_HPP_// #include // #include #include #include #include #include #include // #include // #include "customer headers"#include "string.
2009-09-18 21:35:00 529
原创 字符串类的封装
基于标准库的字符串操作的封装. #ifndef STRING_HPP_#define STRING_HPP_#pragma warning(disable: 4786)#pragma warning(disable: 4996)// #include #include #include #include #include #include #
2009-09-18 21:31:00 631
C/C++ Reference
2010-08-03
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人