Depending on which computing system you use, you will have to consider the byte order in which multibyte numbers are stored, particularly when you are writing those numbers to a file. The two orders are called "Little Endian" and "Big Endian". 阅读全文>
发表于 @ 2008年10月29日 20:42:00|评论(loading...)|收藏
Problems with byte order are frustrating, and I want to spare you the grief I experienced. Here's the key:
Problem: Computers speak different languages, like people.
Some write data "left-to-right" and others "right-to-left".
A machine can read its own data just fine - problems happen when one computer stores data and a different type tries to read it.
Solutions
Agree to a common format (i.e., all network traffic follows a single format), or
Always include a header that describes th阅读全文>
发表于 @ 2008年10月26日 15:18:00|评论(loading...)|收藏
This article is aimed at developers who understand templates well enough to use them, but are not very experienced at developing them. Here, I will cover only template classes and not template functions, but the principles are the same in both cases. 阅读全文>
发表于 @ 2008年07月04日 10:19:00|评论(loading...)|编辑|收藏