Ray's playground

 

2011年3月13日

noncopyable implementation in C++

摘要: 1#include<iostream>2usingnamespacestd;34classnoncopyable5{6protected:7noncopyable(){}8~noncopyable(){}9private:10noncopyable(constnoncopyable&);11constnoncopyable&operator=(constnoncopyable&);12};1314classmyclass:privatenoncopyable15{16public:17myclass()18{19cout<<"mycla 阅读全文

posted @ 2011-03-13 16:20 Ray Z 阅读(262) 评论(0) 推荐(0) 编辑

Project Euler Problem 19

摘要: You are given the following information, but you may prefer to do some research for yourself.1 Jan 1900 was a Monday.Thirty days has September,April, June and November.All the rest have thirty-one,Saving February alone,Which has twenty-eight, rain or shine.And on leap years, twenty-nine.A leap year 阅读全文

posted @ 2011-03-13 12:07 Ray Z 阅读(370) 评论(0) 推荐(0) 编辑

Metaphors for a Richer Understanding of Software Development (Chapter 2 of Code Complete)

摘要: Metaphors are heuristics, not algorithms. As such, they tend to be a little sloppy. Metaphors help you understand the software-development process by relating it to other activities you already know about. Some metaphors are better than others. Treating software construction as similar to building . 阅读全文

posted @ 2011-03-13 11:12 Ray Z 阅读(196) 评论(0) 推荐(0) 编辑

导航