随笔分类 -  00.C/C++

摘要:Server:/*filename: TcpSvr.cpp*/#include #include int main(){ WORD wVersionRequested; WSADATA wsaData; int err; wVersionRequested = MAKEWORD( 1, 1 ); ... 阅读全文
posted @ 2014-07-23 16:33 庚武
摘要:官网:https://code.google.com/p/duilib/基于:http://www.viksoe.dk/code/windowless1.htm教程:http://www.cnblogs.com/Alberl/tag/duilib%E5%85%A5%E9%97%A8%E6%95%99... 阅读全文
posted @ 2014-07-21 15:10 庚武
该文被密码保护。
posted @ 2014-07-14 18:20 庚武 阅读(3) 评论(0) 推荐(0)
该文被密码保护。
posted @ 2014-07-10 11:53 庚武
该文被密码保护。
posted @ 2014-07-09 15:04 庚武
该文被密码保护。
posted @ 2014-07-09 12:05 庚武
该文被密码保护。
posted @ 2014-06-14 11:11 庚武 阅读(1) 评论(0) 推荐(0)
摘要:官网:http://sourceforge.net/projects/orwelldevcpp/编译时遇到Illegal byte sequence错误,解决办法:工程属性-》参数-》编译器 加入-finput-charset=GBK#define UNICODE#include /* This i... 阅读全文
posted @ 2014-06-12 16:13 庚武 阅读(1190) 评论(0) 推荐(0)
摘要:#include #include #ifndef _UTIL_H_#define _UTIL_H_/*向VS的调试窗口打印调试信息*/void OutputDebug( const char * lpszFormat, ... ){#ifdef _DEBUG char chInput[512] =... 阅读全文
posted @ 2014-06-05 17:22 庚武
摘要:#include #include int main(/*int argc, char const *argv[]*/){ void * target; time_t now = time(NULL); if(now & 1) target = &&odd; else target = &&e... 阅读全文
posted @ 2014-05-16 16:58 庚武 阅读(180) 评论(0) 推荐(0)
摘要:// stdafx.h : include file for standard system include files,// or project specific include files that are used frequently, but// are changed infrequently//#if !defined(AFX_STDAFX_H__A3DDEB0A_0CE3_44DE_9AD8_B5AD12758B55__INCLUDED_)#define AFX_STDAFX_H__A3DDEB0A_0CE3_44DE_9AD8_B5AD12758B55__INC... 阅读全文
posted @ 2013-09-19 23:25 庚武 阅读(268) 评论(0) 推荐(0)
摘要:GDI映射模式(mapping mode):和映射模式紧密相关的还有4个其它的设备环境属性:1.窗口原点(window origin)2.视口原点(viewport origin)3.窗口范围(window extents)4.视口范围(viewport extents)所有GDI函数中(如TextOut),参数坐标值都是“逻辑单位(logical unit)”, Windows必须将逻辑单位转换为“设备单位(device unit)”Windows定义了8种映射模式。他们在WINGDI.H中定义的标识符如下表示.映射模式被定义为从“窗口”(window)(逻辑坐标)到“视口”(viewpor 阅读全文
posted @ 2013-09-16 00:47 庚武 阅读(700) 评论(0) 推荐(0)
摘要:电驴下载TC2英文原版安装文件,3 Disk,安装方法记录如下:cmd.exechcp 437挂载安装文件夹1到A盘subst a: d:\c\Disk1另开一个cmd,转到A盘,输入install安装后,提示放下第二个盘然后在第一个cmd中输入:取消挂载Asubst a: /Dsubst a: d:\c\Disk2然后去第二个cmd中输入任意键subst a: /Dsubst a: d:\c\Disk3安装完成.启动脚本:rem '_StartTc.bat'set path=c:\tc;%path%chcp 437tc.exe http://files.cnblogs.com 阅读全文
posted @ 2013-07-16 00:22 庚武 阅读(495) 评论(0) 推荐(0)
摘要:主页: http://valgrind.org/文档下载:http://valgrind.org/docs/download_docs.html简单使用: http://cs.ecs.baylor.edu/~donahoo/tools/valgrind/valgrind --tool=memcheck --leak-check=yes --show-reachable=yes --num-callers=20 --track-fds=yes ./testValgrind is an instrumentation framework for building dynamic analysis 阅读全文
posted @ 2013-05-16 17:02 庚武 阅读(338) 评论(0) 推荐(0)
摘要:#include <iostream>#include <cmath>#include <cstdlib>#include <cstdio>using namespace std;double arctan(double x);inline double getItem(double x,int i);int main(int argc, char *argv[]){ bool b1,b2,b3; cout <<"test 1E-15:"<< 1E-15<<endl; cout <&l 阅读全文
posted @ 2013-05-15 01:04 庚武 阅读(372) 评论(0) 推荐(0)
摘要:/* * mycat.c * * Copyright 2013 spark <spark@spark-vbox> * */#include <stdio.h>int main(int argc, char **argv){ FILE *fp; void filecopy(FILE *, FILE *); if(argc == 1){ filecopy(stdin,stdout); } else{ while(--argc>0){ if( (fp=fopen(*++argv,"r")) ==NULL){ printf("fail to 阅读全文
posted @ 2013-05-09 15:01 庚武 阅读(485) 评论(0) 推荐(0)
摘要:#include <iostream>using namespace std;class A{public: A():x(1){} virtual void to_str(){ cout<<"A.x:"<<x<<" @ "<<hex<<this<<dec<<endl; } virtual void set_x(int xx){ cout<<"A setx called"<<endl; x = xx; }private 阅读全文
posted @ 2012-12-13 14:33 庚武 阅读(280) 评论(0) 推荐(0)
摘要:#include <iostream>using namespace std;struct CPoint{ int x,y;};class Point{public: Point(int x, int y){ pt.x = x; pt.y = y; } int x() const {return pt.x;} int y() const {return pt.y;} CPoint get_pt() { return pt; } // 自定义转换操作符 operator CPoint(){ return pt; } operator int(){ return pt.x + pt.. 阅读全文
posted @ 2012-12-11 17:54 庚武 阅读(267) 评论(0) 推荐(0)
摘要:from《C++ Common Knowledge》#include <iostream>using namespace std;extern void fi(int);extern void fl(long);extern void fc(char);class Foo{public: Foo(){}; virtual ~Foo(){}; static void do_foo(int i){ cout<<"您好,您输入了i="<<i<<endl; } void to_str(){ cout<<"a_:& 阅读全文
posted @ 2012-12-07 14:15 庚武 阅读(225) 评论(0) 推荐(0)