﻿<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:trackback="http://madskills.com/public/xml/rss/module/trackback/" xmlns:wfw="http://wellformedweb.org/CommentAPI/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/"><channel><title>C++博客-happy blog-文章分类-C++ study fragment</title><link>http://www.cppblog.com/xhb-happy/category/1899.html</link><description /><language>zh-cn</language><lastBuildDate>Wed, 21 May 2008 17:21:13 GMT</lastBuildDate><pubDate>Wed, 21 May 2008 17:21:13 GMT</pubDate><ttl>60</ttl><item><title>关于并口在Linux系统中的应用</title><link>http://www.cppblog.com/xhb-happy/articles/10900.html</link><dc:creator>从头再来</dc:creator><author>从头再来</author><pubDate>Sun, 06 Aug 2006 15:11:00 GMT</pubDate><guid>http://www.cppblog.com/xhb-happy/articles/10900.html</guid><wfw:comment>http://www.cppblog.com/xhb-happy/comments/10900.html</wfw:comment><comments>http://www.cppblog.com/xhb-happy/articles/10900.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://www.cppblog.com/xhb-happy/comments/commentRss/10900.html</wfw:commentRss><trackback:ping>http://www.cppblog.com/xhb-happy/services/trackbacks/10900.html</trackback:ping><description><![CDATA[1、2－9脚为可用数据口（输出）：inb(0x378)/outb(0x378)，可以用来输出TTL电平<br />2、10－15为可用状态口（输入）：inb(0x379)/outb(0x379)，可以用来检测TTL电平或通断信号<img src ="http://www.cppblog.com/xhb-happy/aggbug/10900.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.cppblog.com/xhb-happy/" target="_blank">从头再来</a> 2006-08-06 23:11 <a href="http://www.cppblog.com/xhb-happy/articles/10900.html#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item><item><title>关于指针有多长的思考</title><link>http://www.cppblog.com/xhb-happy/articles/8402.html</link><dc:creator>从头再来</dc:creator><author>从头再来</author><pubDate>Sun, 11 Jun 2006 01:09:00 GMT</pubDate><guid>http://www.cppblog.com/xhb-happy/articles/8402.html</guid><wfw:comment>http://www.cppblog.com/xhb-happy/comments/8402.html</wfw:comment><comments>http://www.cppblog.com/xhb-happy/articles/8402.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://www.cppblog.com/xhb-happy/comments/commentRss/8402.html</wfw:commentRss><trackback:ping>http://www.cppblog.com/xhb-happy/services/trackbacks/8402.html</trackback:ping><description><![CDATA[
		<blockquote dir="ltr" style="MARGIN-RIGHT: 0px">
				<p>有个同学告诉我，现在学生的面试题很基础，他就碰到过一次，“1个指针占几个字节”？答案是4个字节。<br />当时我没有太在意，CPU的寻址能力与CPU的字长是相等的，32位的处理器寻址4G的空间，指针当然要用4个字节（4×8＝32）来表示。<br />但前两天无意中翻了一下微机原理，看到关于intel8088的原理分析，让我产生了很大的困惑，8088的有地址20条地址线，但却是准16位的处理器。按一贯以来的想法，8位的CPU寻址256个地址单元，16位的CPU寻址64K个地址单元，这显然与20条地址引线（可直接寻址1M个地址单元）的寻址范围有很大的出入。<br />看来“CPU的寻址能力与CPU的字长相等”在8088中是行不通的。但我关心的是，在C++的编译系统中，为了寻址1M个地址单元，指针要用几个字节？总不能说2个半吧，要不那时候还没C＋＋，不用管了？<br />希望能得到点答案，各位发表点看法？</p>
		</blockquote>
<img src ="http://www.cppblog.com/xhb-happy/aggbug/8402.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.cppblog.com/xhb-happy/" target="_blank">从头再来</a> 2006-06-11 09:09 <a href="http://www.cppblog.com/xhb-happy/articles/8402.html#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item><item><title>获取UDP源端的IP及PORT</title><link>http://www.cppblog.com/xhb-happy/articles/8191.html</link><dc:creator>从头再来</dc:creator><author>从头再来</author><pubDate>Mon, 05 Jun 2006 14:36:00 GMT</pubDate><guid>http://www.cppblog.com/xhb-happy/articles/8191.html</guid><wfw:comment>http://www.cppblog.com/xhb-happy/comments/8191.html</wfw:comment><comments>http://www.cppblog.com/xhb-happy/articles/8191.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://www.cppblog.com/xhb-happy/comments/commentRss/8191.html</wfw:commentRss><trackback:ping>http://www.cppblog.com/xhb-happy/services/trackbacks/8191.html</trackback:ping><description><![CDATA[
		<blockquote dir="ltr" style="MARGIN-RIGHT: 0px">
				<p>
						<font size="2"> 今天有个同学问我，怎么得到UDP发送端的IP和端口号。<br /> 我想应该在MFC中有封装的类提供这个功能。<br />因为IP首部包含源端和目的端的IP， UDP首部包含源端和目的端端口号。查了一下MSDN中的CSocket类，果然有ReceiveFrom成员函数，在 OnAccept中调用就行了。<br /> /*********************************************************************<br /> CString ip;<br /> UINTport;<br /> BYTE tmpbuff[256];//Byte 类型的数组，它是存储接收到的数据的位置<br /> memset(tmpbuff,0,256);<br /> int ret = ReceiveFrom(tmpbuff,256,ip,port,0);//获得源端(UDP)的数据及IP、Port;<br /> **********************************************************************/</font>
				</p>
		</blockquote>
<img src ="http://www.cppblog.com/xhb-happy/aggbug/8191.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.cppblog.com/xhb-happy/" target="_blank">从头再来</a> 2006-06-05 22:36 <a href="http://www.cppblog.com/xhb-happy/articles/8191.html#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item></channel></rss>