自定义博客皮肤VIP专享

*博客头图:

格式为PNG、JPG,宽度*高度大于1920*100像素,不超过2MB,主视觉建议放在右侧,请参照线上博客头图

请上传大于1920*100像素的图片!

博客底图:

图片格式为PNG、JPG,不超过1MB,可上下左右平铺至整个背景

栏目图:

图片格式为PNG、JPG,图片宽度*高度为300*38像素,不超过0.5MB

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

-+
  • 博客(13)
  • 资源 (10)
  • 收藏
  • 关注

原创 继续看题之c++

二分查找:int bs(int *a,int len,int val){    int l=0;    int m=len/2;    int r=len-1;while(l!=m && r!= m)    {        if(a[m] > val)        {            r = m;            m = (m+l)/2;        } 

2010-05-28 17:38:00 267

原创 专注c++,看题

SIZEOF CONST 预处理题目:1. sizeof相关系列问题a. struct s{char a;int b};  sizeof(s) = 8; 因为当结构体内元素长度都小于处理器位数(32位=4字节)的时候,便以结构体中最长的<span class="t_tag" onclick="function onclick(){tagshow(event)}">数据元素为对齐条件

2010-05-28 16:25:00 307

原创 Access violation之字符串

通常:char* str="test";不要修改这种方式声明的字符串内容。malloc没问题。数组方式:虽然也使用了静态只读数据段里内容,但很显然是复制而不仅仅是指向偏移,所以修改其中的内容不会导致错误。 

2010-05-28 09:58:00 278

原创 windows内存管理

windows NT系统是以页尾基础的虚拟内存系统,使用32位线性地址。在内部,系统管理被称为页的4096字节段中的所有内存。每页的物理内存都被备份。临时的内存页使用页文件(pagefile),只读的内存页使用磁盘文件。同一时刻,最多可有16个不同的页文件。代码,资源和其他只读数据通过他们创建的文件直接备份。// Memory.cpp : Defines the entry poi

2010-05-27 10:34:00 429

原创 Boost有点意思

开源的东西很赞,仔细看下文档就能用。// Shell.cpp : Defines the entry point for the console application.//#include "stdafx.h"#include #include #include #include using namespace std;int _tmain(int argc, _TCHAR* arg

2010-05-21 17:26:00 280

原创 初识多媒体

最近想了解一些多媒体,看了点东西。#include "stdafx.h"#include "windows.h" int _tmain(int argc, _TCHAR* argv[]){ ShellExecute(NULL,"open",    "d://Wildlife.wmv","","",SW_SHOWNORMAL ); return 0;} 多媒体开发方法:1 使用o

2010-05-21 14:19:00 405

原创 关于C++ Effective

终于草草地把这本书看完了。下决心干一件事还是很快的,放了很久的C++ Effective给我的感觉就是观念性的冲击。之前对于程序员的理解仅限于实现,对于效率,对于内存管理,对于异常安全性,对于很多其他方面一无所知。在写了一些MFC的网络相关的简单实现之后,觉得实现只是个基本的目标。同样是一个实现,你的资源管理,你对效率的关注,你对编译期的关注,这些才反映你的深度。我需要更多的实

2010-05-20 17:52:00 239

原创 动态绑定与静态绑定

class B{public:void mf();...}; class D:public B{public:void mf();  //遮掩了B:mf()...}; D x;B* pB=&x;D* pD=&x; pB->mf(); //调用B::mf()pD->mf();//调用D::mf() non-virtual函数

2010-05-12 16:55:00 281

原创 inline是个申请,编译器可以忽略

inline void f(){...}void (*pf)()=f;  //pf指向f...f();  //这个调用被inlinepf();//这个或许不被inline,因为是通过函数指针达成

2010-05-11 17:00:00 341

原创 Dynamic_cast的效率问题

dynamic_cast的作用:在derived class身上执行derived class 执行函数,手头只有指向base的pointer或reference.方案一:class Window{...};class SpecialWindow:public Window{public:void blink();...}; typedef std::vecto

2010-05-11 10:52:00 1060

原创 写一个不抛异常的swap函数

Consider support for a non-throwing swap.STL中的swap算法:namespace std{templatevoid swap(T& a,T& b){T temp(a);a=b;b=temp;}} 复制动作无一必要。考虑以指针指向一个对象,内含真正数据。class WidgetImpl{publi

2010-05-10 14:17:00 374

原创 让接口容易被正确使用,不易被误用

Make interfaces easy to use correctly and hard to use incorrectly.为表现日期的class设计构造函数:class Date{public :Date(int month,int day,int year);...}; 客户有可能的错误:Date d(30,3,1995); 导入wrapper

2010-05-07 09:20:00 293

原创 智能指针

今天开始写c++ effective的读书笔记。以对象管理资源需要pointer-like object,即智能指针。#include "stdafx.h"#include "iostream"#include "memory" using namespace std;int _tmain(int argc, _TCHAR* argv[]){  int* p=new int(12); 

2010-05-06 09:45:00 229

flask框架原理

描述了web服务器和flask的关系;对web服务器和flask框架的搭建给了建议;初学者可以快速对flask框架有清晰的认识!

2017-09-02

WCF的简单实验,实用

WCF的框架搭建,参考网上的连载,简单的计算服务

2010-04-30

MFC写的IE,有收藏夹功能

MFC写的浏览器,有基本功能,收藏夹链接可用,其他功能有待完善

2010-04-28

MFC写的浏览器,有收藏夹

基本的浏览器功能,收藏夹的链接跳转问题在研究中

2010-04-28

Operating data using asp.net

Add,delete and search data record without database

2009-12-02

A Simple Chatting Program using C++

A simple program that can send and receive messages,the applied environment is the same network.

2009-10-21

Draw different style using MFC

Know message on_command(ID_Line,&CDrawMView::OnLine())

2009-09-23

Make Two Timers using MFC

Learn MFC to know how the messages work and timer will give very swift result

2009-09-13

WF Practice

It has some useful components of WF,if you just want to learn something about WF.It may be helpful for you.

2009-05-11

simple workflow

very easy to understand the idea of workflow

2009-04-21

空空如也

TA创建的收藏夹 TA关注的收藏夹

TA关注的人

提示
确定要删除当前文章?
取消 删除