
编程语言-C++
文章平均质量分 67
jxluoix
能够自己独立开发中小型的软件系统;
对工作态度认真、执着、诚恳;勇于专研、探索、创新;
接受新事物快、见识宽广.
展开
-
网络编程-SOCKET-创建SOCKET-WINDOWS下socket函数声明问题
今天翻了下VC下SOCKET头文件WINSOCK2.H,又看了下socket函数的声明: #if INCL_WINSOCK_API_PROTOTYPESWINSOCK_API_LINKAGESOCKETWSAAPIsocket( int af, int type, int protocol );#endif // INCL_WIN...原创 2012-08-10 00:18:44 · 551 阅读 · 0 评论 -
Windows Make file(VC, NMAKE)
DEBUG=../DebugPATH_VS=D:\usr\bin\Microsoft Visual Studio\VC98CL="$(PATH_VS)\Bin\cl.exe"LINK="$(PATH_VS)\Bin\link.exe" INCLUDE="D:\usr\bin\Microsoft Visual Studio\VC98\Include"LIB="D:\usr\...2014-04-08 00:24:29 · 122 阅读 · 0 评论 -
C/C++中嵌入LUA脚本(C/C++与LUA相互交互调用)
/* * * * @author ada * @version 1.0 * @since 1.0 */#include <stdio.h>#include <string.h>#include <log.h>#include "../gs/LuaContext.hpp"#include "../gs/LuaExec...原创 2014-04-11 00:00:12 · 475 阅读 · 0 评论 -
C Run-Time Library _beginthread, _beginthreadex to create thread
#ifndef _MT#error "Compiler linking options /MT not specific"#endif #include <stdio.h>#include <windows.h>#include <process.h> void start_address(void *arg){prin...2014-04-15 19:06:24 · 145 阅读 · 0 评论 -
C++ Thread class
/* * Thread that support cross platform and support global and local start routine, and support * Windows api and C Run-Time Library(even extension) on windows. * <p> * To implements ...2014-04-15 20:44:00 · 166 阅读 · 0 评论 -
C++ Thread class
/* * Thread that support cross platform and support global and local start routine, and support * Windows api and C Run-Time Library(even extension) on windows. * <p> * To implements ...2014-04-16 00:02:21 · 191 阅读 · 0 评论 -
C/C++中嵌入LUA脚本(C/C++与LUA相互交互调用)-2
/* * * * @author ada * @version 1.0 * @since 1.0 */#include <log.h>#include "../LuaRuntime.hpp"#include "../Task.hpp"#include "../../LinkedLibrary.h" LuaRuntime *runtim...2014-04-16 23:07:39 · 179 阅读 · 0 评论 -
lambda
lambda lambda在计算机编程语言中,如Lisp,Python和Ruby, λ是一个算子,用于表示匿名函数或者闭包,后跟λ演算的用法。在C#编程语言中,一个λ表达式是一个包含表达式和语句的匿名函数。非λ语言是一种基于组合逻辑的函数式编程语言,一个简单化的λ演算并不包含λ所有的内容, lambda term 一个有效的lambda表达...2016-09-06 22:31:59 · 235 阅读 · 0 评论 -
g++ -v --help
Usage: g++ [options] file...Options: -pass-exit-codes Exit with highest error code from a phase --help Display this information --target-help Display ...原创 2016-09-30 01:07:16 · 1747 阅读 · 0 评论 -
C/C++ offsetof编译问题
#include <stdlib.h>#include <stddef.h> #include <stdio.h>struct Entry{int key;int value;struct Entry *next;}; typedef struct Entry Entry_t; class BEntry...原创 2016-09-30 01:07:45 · 766 阅读 · 0 评论 -
C++ (动态)内存分配区域:自由存储区(Free Store)&堆区(Heap)
Heap:The heap is the other dynamic memory area,allocated/freed by malloc/free and theirvariants. Note that while the default globalnew and delete might be implemented in terms ofmalloc and ...2016-10-04 00:25:46 · 684 阅读 · 0 评论 -
lambda和函数式概念区别
> (define x (let ((a "this is a")) a)) > x$22 = "this is a"2016-11-11 16:42:10 · 389 阅读 · 0 评论 -
pthread_exit & pthread_join 有一种被骗了的感觉!
#include <stdio.h>#include <stdlib.h>#include <unistd.h>#include <pthread.h> int *exitStatus = NULL;int count = 0; void* run_up(void *arg){printf("&...2014-04-07 00:39:00 · 156 阅读 · 0 评论 -
Linux下C/C++ 多线程同步
#include <pthread.h>#include "PosixMutexLock.hpp" #ifndef POSIX_SYNC#define POSIX_SYNCclass PosixSync {private: protected: PosixMutexLock *lock; pthread_cond_t block;...2014-04-02 23:01:06 · 233 阅读 · 0 评论 -
C++ Observer 实现
#include <vector>#include "Observer.hpp" #ifndef OBSERVABLE#define OBSERVABLEclass Observable{private:std::vector<Observer *> observers; public:Observable(); voi...2014-03-30 15:25:33 · 187 阅读 · 0 评论 -
通信_网络编程_WINDOWS下网络编程_SOCKET编程_VC中WINSOCK2.H头文件SOCKET
<!-- [if gte mso 9]><xml> <w:WordDocument> <w:View>Normal</w:View> <w:Zoom>0</w:Zoom> <w:PunctuationKerning/> <w:DrawingGri原创 2012-08-10 01:02:54 · 515 阅读 · 0 评论 -
C/C++-Windows平台Win32编程-Windows API-HINSTANCE
HINSTANCE WTYPES.H头文件中定义如下: typedef void __RPC_FAR *HINSTANCE; HINSTANCE是“句柄型”数据类型, 从WTYPES.H中定义来看, 它其实就是一个void的指针类型void *. HINSTANCE在使用有其特殊的含义, 跟void *的应用不同, 它是作为程序运行实例(当前实例, 就类似于进程)的一个句柄...2012-08-26 20:32:12 · 369 阅读 · 0 评论 -
C/C++-Windows平台Win32编程-Windows API-WinMain
WinMain Windows平台下Win32应用程序的入口, 就类似C/C++的入口函数int main(int argc, char* argv[]). 该入口函数原型定义在WINBASE.H头文件中定义如下:#ifndef _MACintWINAPI#elseintCALLBACK#endifWinMain( HINSTANCE h...2012-08-26 20:55:12 · 261 阅读 · 0 评论 -
OPENSSL API RSA ENCRYPT & DECRYPT
// test.cpp// // @author ada// @version 1.0 2015-01-10#include "stdafx.h"#include<stdio.h>#include<stdlib.h>#include<string.h>#include<openssl/rsa.h>#include<openssl/pem.h&...2015-01-18 19:29:42 · 220 阅读 · 0 评论 -
Windows CryptoAPI
// win32-test.cpp : 定义控制台应用程序的入口点。// // Defines the entry point for the console // application.#include "stdafx.h"#include <tchar.h>#include <stdio.h>#include <windows.h>#include <...2015-01-24 18:20:08 · 224 阅读 · 0 评论 -
socket select programing
#pragma comment(lib,"ws2_32.lib") #include <stdio.h>#include <string.h>#include <WINSOCK2.H> #include <log.h>#include "socket/HardSocket.h"#include "socket/L原创 2014-03-05 21:20:41 · 109 阅读 · 0 评论 -
socket poll programing
#include <stdio.h>#include <stdlib.h>#include <string.h>#include <sys/socket.h>#include <poll.h>#include <sys/time.h>#include <netinet/in.h>#in原创 2014-03-06 18:05:37 · 118 阅读 · 0 评论 -
VC命令行环境下生成.DLL, .LIB库
创建make文件 Makefile.nmake make文件内容 DEBUG=./Debug liblog.lib:#"D:\usr\bin\Microsoft Visual Studio\VC98\Bin\cl.exe" /GX /W3 /I "D:\usr\bin\Microsoft Visual Studio\VC98\Include" /c ...原创 2014-03-06 23:52:34 · 226 阅读 · 0 评论 -
Windows下C/C++ 多线程同步(mutex)
#ifndef __LOCK#define __LOCK class Lock{public: virtual void lock() = 0; virtual void unlock() = 0;}; #endif ======================================= #include <windo...2014-03-28 22:49:32 · 646 阅读 · 0 评论 -
Windows下C/C++ 多线程同步(event)
#ifndef __LOCK#define __LOCK class Lock{public: virtual void lock() = 0; virtual void unlock() = 0;}; #endif =========================================================== ...2014-03-28 22:56:09 · 219 阅读 · 0 评论 -
Windows下C/C++ 多线程同步
#include "Lock.hpp"#include "EventLock.hpp" #ifndef __SYNC#define __SYNCclass Sync {private: protected: EventLock *lock; EventLock *block; public: Sync(); void w...2014-03-29 00:45:11 · 296 阅读 · 0 评论 -
一些有关PEM(PEM_read)的代码
typedef void bio_info_cb(struct bio_st *, int, const char *, int, long, long); struct crypto_ex_data_st { STACK_OF(void) *sk; int dummy; /* gcc is screwi...2017-05-24 23:31:54 · 635 阅读 · 0 评论