<?xml version="1.0" encoding="GB2312"  ?>
<rss version="2.0">
<channel>
<title>ChinaUnix.net - C/C++</title>
<link>http://bbs.chinaunix.net/forumdisplay.php?fid=23</link>
<description>CÊÇÊÀ½çÉÏÊ¹ÓÃ×î¹ã·º¼ÆËã»úÓïÑÔ¡£CµÄÃæÏò¶ÔÏóµÄÀ©Õ¹³ÆÎªC++¡£</description><managingEditor>admin@staff.chinaunix.net</managingEditor>
<webMaster>admin@staff.chinaunix.net</webMaster>
<lastBuildDate>2008-03-06 16:46:23</lastBuildDate>
<item>
<title>I/OµØÖ·µÄÎÊÌâ </title>
<link>http://bbs.chinaunix.net/viewthread.php?tid=1061711</link>
<author>heefly</author><pubDate>2008-03-06 16:17:39</pubDate><description><![CDATA[
×÷Õß: heefly
·¢±íÓÚ: 2008-03-06 16:17:39 (GMT 8)
¼ò½é£º²»ÖªµÀÔÚ´ËÎÊÊÇ²»ÊÇºÏÊÊ£¬Ö»ÊÇÎÒµ½Õâ¸ö°æ¿ìµÄ´ÎÊý¶àÒ»µã¡£Çë°ßÖñÔ­ÁÂ¡£


Ð¡µÚ¶Ô¼ÆËã»úµ×²ãºÍÓ²¼þµÄ¶«Î÷²»ÊÇºÜÁË½â£¬ÔÚ¿´µ½Ò»¶Î´®¿Ú³õÊ¼»¯µÄ´úÂëÖÐ£¬

        outportb(0x2fb,0x80);
        outportb(0x2f8,
]]></description>
</item>
<item>
<title>ÖªÃûÈí¼þ¹«Ë¾³ÏÆ¸C++ÈËÔ± </title>
<link>http://bbs.chinaunix.net/viewthread.php?tid=1061684</link>
<author>Amandawang</author><pubDate>2008-03-06 15:41:12</pubDate><description><![CDATA[
×÷Õß: Amandawang
·¢±íÓÚ: 2008-03-06 15:41:12 (GMT 8)
¼ò½é£º
]]></description>
</item>
<item>
<title>ÇóÖúÓÃC++½«ÖÐÓ¢ÎÄ·ÖÀë </title>
<link>http://bbs.chinaunix.net/viewthread.php?tid=1061664</link>
<author>gqgl</author><pubDate>2008-03-06 15:18:01</pubDate><description><![CDATA[
×÷Õß: gqgl
·¢±íÓÚ: 2008-03-06 15:18:01 (GMT 8)
¼ò½é£ºÎÒÏë½«¡°ÖÐÎÄÖÐÎÄÖÐÎÄabcdefgÖÐ¹úÖÐ¹úÖÐ¹ú¡±²ð·Ö³É¡°ÖÐÎÄÖÐÎÄÖÐÎÄ¡±£¬¡°abcdefg¡±£¬¡°ÖÐ¹úÖÐ¹úÖÐ¹ú¡±¡£Çë½Ì¸öÎ»¸ßÊÖÈçºÎÊµÏÖ£¿£¿£¿
]]></description>
</item>
<item>
<title>Çë½ÌÒ»ÏÂÕâ¸ö½á¹¹Ìå¶¨Òåµ½µ×Ê²Ã´ÒâË¼£¿ </title>
<link>http://bbs.chinaunix.net/viewthread.php?tid=1061618</link>
<author>jacktechen</author><pubDate>2008-03-06 14:23:57</pubDate><description><![CDATA[
×÷Õß: jacktechen
·¢±íÓÚ: 2008-03-06 14:23:57 (GMT 8)
¼ò½é£ºstruct  test
{
	unsigned long aa;
	unsigned long bb;
	unsigned long cc;	
};

struct  test  s={
	aa:8*1024,
	bb:2*1024,
	cc:2*1024	
};
¹Ø¼üÊÇÏÂÃæÒ»¸ö¶¨Òå²»Ì«¶®£¬ÓÖ²»Ì«ÏñÎ»Óò¡£
]]></description>
</item>
<item>
<title>ÔÚÏßÇóÖú£ºlinuxÏÂsocket±à³ÌÎÊÌâ </title>
<link>http://bbs.chinaunix.net/viewthread.php?tid=1061605</link>
<author>bxhbrbyy</author><pubDate>2008-03-06 13:56:25</pubDate><description><![CDATA[
×÷Õß: bxhbrbyy
·¢±íÓÚ: 2008-03-06 13:56:25 (GMT 8)
¼ò½é£ºclient¶ËºÍserver¶ËÊ¹ÓÃtcp½øÐÐÍ¨ÐÅ£¬server¶ËÀûÓÃrecvº¯Êý×èÈûµÈ´ýclient¶ËµÄÃüÁî¡£
µ«ÊÇÎÊÌâÊÇ£¬µ±client¶ËÓÃclose¶Ï¿ªsocketÊ±£¬server¶ËµÄrecvº¯ÊýÎªÊ²Ã´¼ì²â²»µ½ÄØ£¿£¨Í¨¹ý¼ì²ârevcµÄ·µ»ØÖµÊÇ·ñ<=0£©
µ«ÊÇÓÃs
]]></description>
</item>
<item>
<title>Çë½Ì×Ö·û´®Ö±½Ó·Ö¶Î·ÅÈë½á¹¹ÌåµÄ·½·¨ </title>
<link>http://bbs.chinaunix.net/viewthread.php?tid=1061593</link>
<author>dynamic516</author><pubDate>2008-03-06 13:40:22</pubDate><description><![CDATA[
×÷Õß: dynamic516
·¢±íÓÚ: 2008-03-06 13:40:22 (GMT 8)
¼ò½é£ºÈç¹ûÓÐÕâÃ´Ò»¸ö´®£º
char *str="16headerdatatail";
ÔõÃ´¿ÉÒÔ±È½Ï·½±ã°Ñ
16
header
data
tail
ÕâËÄ²¿·Ö·Ö±ðµ±×Ö´®´æÈëÒ»¸ö½á¹¹ÌåÄØ£¿
ÎÒÊÇÕâÑù
memcpy(MyDataStruct.length,str,2);
À´µÃµ½
MyDataStruct.
]]></description>
</item>
<item>
<title>Ò»µÀÖÇÁ¦Ìâ </title>
<link>http://bbs.chinaunix.net/viewthread.php?tid=1061592</link>
<author>cuijxin</author><pubDate>2008-03-06 13:38:05</pubDate><description><![CDATA[
×÷Õß: cuijxin
·¢±íÓÚ: 2008-03-06 13:38:05 (GMT 8)
¼ò½é£º1000ÕµµÆ,Î§³ÉÒ»¸öÈ¦,¸Ä±äÒ»ÕµµÆµÄ×´Ì¬,ËüÁ½±ßµÄÁ½ÕµµÆµÄ×´Ì¬Ò²¸Ä±ä,ÎÊÈçºÎµãÁÁ1000ÕµµÆ(Á½²àµÄµÆ²»ÄÜÔÙÓ°ÏìÆäËûµÄµÆÀ²)
]]></description>
</item>
<item>
<title>ÕâÖÖ¶¨ÒåÊ²Ã´ÒâË¼£¿ÓÐÊ²Ã´ÓÃ´¦£¿ </title>
<link>http://bbs.chinaunix.net/viewthread.php?tid=1061583</link>
<author>gridbird</author><pubDate>2008-03-06 13:27:39</pubDate><description><![CDATA[
×÷Õß: gridbird
·¢±íÓÚ: 2008-03-06 13:27:39 (GMT 8)
¼ò½é£ºmax_size=0x1000000; //16Mb

ÕâÖÖ¶¨ÒåÊ²Ã´ÒâË¼£¿ÓÐÊ²Ã´ÓÃ´¦£¿
]]></description>
</item>
<item>
<title>WINXP ÏÂÓÃÄÄ¸ö±à¼©Æ÷Ñ§C++ºÃ? </title>
<link>http://bbs.chinaunix.net/viewthread.php?tid=1061576</link>
<author>fish_happy</author><pubDate>2008-03-06 13:14:42</pubDate><description><![CDATA[
×÷Õß: fish_happy
·¢±íÓÚ: 2008-03-06 13:14:42 (GMT 8)
¼ò½é£ºWINXP ÏÂÓÃÄÄ¸ö±à¼©Æ÷Ñ§C++ºÃ?
]]></description>
</item>
<item>
<title>Qt programming </title>
<link>http://bbs.chinaunix.net/viewthread.php?tid=1061567</link>
<author>hanwenhao</author><pubDate>2008-03-06 13:09:25</pubDate><description><![CDATA[
×÷Õß: hanwenhao
·¢±íÓÚ: 2008-03-06 13:09:25 (GMT 8)
¼ò½é£ºÓÐÈËÄÜ·ÖÏíÒ»ÏÂC++ QT±à³Ì×ÊÁÏÂð?

Ð»Ð»ÏÈ
JK
]]></description>
</item>
<item>
<title>linuxÏÂÓÃc¿ª·¢µÄÒ»¸öÆæ¹ÖÎÊÌâ </title>
<link>http://bbs.chinaunix.net/viewthread.php?tid=1061523</link>
<author>jinmiaobis</author><pubDate>2008-03-06 11:48:19</pubDate><description><![CDATA[
×÷Õß: jinmiaobis
·¢±íÓÚ: 2008-03-06 11:48:19 (GMT 8)
¼ò½é£ºÎÒÔÚliunx ÓÃc¿ª·¢£¬Ô­³ÌÐòºÍÊý¾Ý¿â·Ö±ð´¦ÓÚ2Ì¨»úÆ÷£¬ÔÚÊý¾Ý¿âÄÇÌ¨»úÆ÷ÉÏ½¨Á¢ÁË2¸ö±í£¬ÄÚÈÝÒ»Ñù£¬Ò»¸öÓÃÓÚ²âÊÔ£¬Ò»¸öÓÃÓÚ¿ª·¢£¬ÎÒµÄ³ÌÐòÁ¬¿ª·¢µÄÄÄ¸öÊý¾Ý¿âÒ»µãÎÊÌâÃ»ÓÐ£¬µ«ÊÇÁ¬²âÊÔ»úÊÇ£¬¾Í³öÏÖ»ñÈ¡ÓÎ±êÊ§°Ü£¬´íÎóÂ
]]></description>
</item>
<item>
<title>#pragma packÎÊÌâ </title>
<link>http://bbs.chinaunix.net/viewthread.php?tid=1061522</link>
<author>volter619</author><pubDate>2008-03-06 11:47:42</pubDate><description><![CDATA[
×÷Õß: volter619
·¢±íÓÚ: 2008-03-06 11:47:42 (GMT 8)
¼ò½é£º#pragma pack(4)

¿´µ½µÄ£º
     class TestB

¡¡¡¡{

¡¡¡¡public:

¡¡¡¡¡¡¡¡int aa; //µÚÒ»¸ö³ÉÔ±£¬·ÅÔÚ[0,3]Æ«ÒÆµÄÎ»ÖÃ£¬

¡¡¡¡¡¡¡¡char a; //µÚ¶þ¸ö³ÉÔ±£¬×ÔÉí³¤Îª1£¬#pragma pack(4),È¡Ð¡Öµ£¬Ò²¾ÍÊÇ1
]]></description>
</item>
<item>
<title>SIGABRT¡¢SIGSEGV¡¢SIGBUSµÄ²úÉúÔ­Òò </title>
<link>http://bbs.chinaunix.net/viewthread.php?tid=1061518</link>
<author>caijimin</author><pubDate>2008-03-06 11:44:57</pubDate><description><![CDATA[
×÷Õß: caijimin
·¢±íÓÚ: 2008-03-06 11:44:57 (GMT 8)
¼ò½é£º¶ÔÓÚÓ¦ÓÃ³ÌÐòÀ´Ëµ£¬Ê²Ã´ÑùµÄ´úÂë»á²úÉúÕâ3ÖÖÐÅºÅ£¿

ÎÒ×Ô¼º³£Åöµ½µÄÊÇ
  char *p = NULL;
  *p = 1;
»á²úÉúSIGSEGV

¶ÔÍ¬Ò»¸öÖ¸Õëfree() 2´Î¿ÉÄÜ»á²úÉúSIGABRT
address alignment¿ÉÄÜ»áµ¼ÖÂSIGBUS


ÄÄÎ»
]]></description>
</item>
<item>
<title>c++±àÒëÎÊÌâ </title>
<link>http://bbs.chinaunix.net/viewthread.php?tid=1061483</link>
<author>cuteorange</author><pubDate>2008-03-06 10:53:22</pubDate><description><![CDATA[
×÷Õß: cuteorange
·¢±íÓÚ: 2008-03-06 10:53:22 (GMT 8)
¼ò½é£ºÈçÏÂ´úÂë±àÒë£ºg++ -c 
class GamePlayer {
    private:
        static const int NUM_TURNS;
        int scores[NUM_TURNS];
};
const int GamePlayer::NUM_TURNS=10;

±¨´í
data member may not have 
]]></description>
</item>
<item>
<title>jpegÔõÃ´´ò¿ª°¡¡­¡­ </title>
<link>http://bbs.chinaunix.net/viewthread.php?tid=1061443</link>
<author>xiaodaoren</author><pubDate>2008-03-06 10:00:48</pubDate><description><![CDATA[
×÷Õß: xiaodaoren
·¢±íÓÚ: 2008-03-06 10:00:48 (GMT 8)
¼ò½é£ºÓÃC±à¸ö³ÌÐò´ò¿ªÒ»¸öjpeg¸ñÊ½µÄÍ¼Æ¬£¬ÀÏ´óÒªÇó¾¡¿ì¡­¡­±ÀÀ£ÖÐ£¬ÍêÈ«ÕÒ²»µ½Í¬ÀàÐÍµÄ×ÊÁÏ¡­¡­
ÖîÎ»ÓÐ×ö¹ý»òÕßÖªµÀÔõÃ´×öµÄÓÐÃ»ÓÐ£¿¡­¡­
ÏÈÒªÅäºÃÒ»¸öjpegµÄ¿âÊÇ°É£¿È»ºóÄØ£¿¡­¡­ÍêÈ«²»ÖªµÀÔõÃ´µ÷ÓÃ¡­¡­ÖîÎ»°ïÃ¦¡­¡­¶
]]></description>
</item>
<item>
<title>c++µÄincludeÎÊÌâ </title>
<link>http://bbs.chinaunix.net/viewthread.php?tid=1061431</link>
<author>gridbird</author><pubDate>2008-03-06 09:44:16</pubDate><description><![CDATA[
×÷Õß: gridbird
·¢±íÓÚ: 2008-03-06 09:44:16 (GMT 8)
¼ò½é£ºÔÚc++³ÌÐòÖÐ£¬ÓÐµÄÓÃ#include<.h>ÎÄ¼þ£¬Èç £º#include<unistd.h>£¬ÓÐµÄ²»ÓÃ.h£¬Ö±½Ó£º#include<iostream>£¬Á½ÕßÓÐÊ²Ã´Çø±ð¡£

»¹ÓÐÒ»¸öÎÊÌâ£¬ÈçÏÂÊ¾³ÌÐòÍ·£º 

#include<iostream>
#include<ostream>

±àÒë³ö
]]></description>
</item>
<item>
<title>¹ØÓÚÏß³Ì&quot;Thread-safe access public member functions/variables&quot; </title>
<link>http://bbs.chinaunix.net/viewthread.php?tid=1061377</link>
<author>jiny1981</author><pubDate>2008-03-06 06:21:15</pubDate><description><![CDATA[
×÷Õß: jiny1981
·¢±íÓÚ: 2008-03-06 06:21:15 (GMT 8)
¼ò½é£º¼ÙÉèÈçÏÂÀà:
#include <iostream.h>

typedef int HANDS;
enum COLOR { Red, Green, Blue, Yellow, White, Black, Brown } ;
enum BOOL { FALSE, TRUE };

class Animal
{
public:
	Animal(int);
	virtua
]]></description>
</item>
<item>
<title>c×¨¼Ò±à³ÌÖÐµÄÒ»¸öÎÊÌâ </title>
<link>http://bbs.chinaunix.net/viewthread.php?tid=1061367</link>
<author>xiaozhu2007</author><pubDate>2008-03-06 00:15:12</pubDate><description><![CDATA[
×÷Õß: xiaozhu2007
·¢±íÓÚ: 2008-03-06 00:15:12 (GMT 8)
¼ò½é£º¼ì²â½ø³ÌÖÐ¿ÉÒÔ·ÖÅä¶à´óÄÚ´æ£º
[code]
#include <stdio.h>
#include <stdlib.h>
#include <sys/resource.h>

int main(void)
{
        int             mb = 0;

        while(malloc(1<<20)){
       
]]></description>
</item>
<item>
<title>¼òµ¥µÄopenÎÊÌâ </title>
<link>http://bbs.chinaunix.net/viewthread.php?tid=1061347</link>
<author>xiaozhu2007</author><pubDate>2008-03-05 22:40:41</pubDate><description><![CDATA[
×÷Õß: xiaozhu2007
·¢±íÓÚ: 2008-03-05 22:40:41 (GMT 8)
¼ò½é£º1¡£Èç¹ûµ±Ç°Ã»ÓÐ½ø³Ì´ò¿ªFIFOÀ´¶Á£¬ÄÇÃ´´ò¿ª¸ÃFIFOÀ´Ð´µÄopenµ÷ÓÃÒ²½«»á×èÈû£¬¶Ô°É£¿
2¡£ÏÂÃæ³ÌÐò£¬×Ö½ø³ÌÎªÊ²Ã´»á×èÈû£¿
[code]
#include "head.h"

int main(int argc, char **argv)
{
        int        
]]></description>
</item>
<item>
<title>¹ØÓÚº¯Êýµ÷ÓÃ¹ý³Ì»î¶¯¼ÇÂ¼µÄÎÊÌâ. </title>
<link>http://bbs.chinaunix.net/viewthread.php?tid=1061343</link>
<author>kornrock</author><pubDate>2008-03-05 22:28:07</pubDate><description><![CDATA[
×÷Õß: kornrock
·¢±íÓÚ: 2008-03-05 22:28:07 (GMT 8)
¼ò½é£ºunixÆ½Ì¨ÏÂc³ÌÐòÖÐº¯Êýµ÷ÓÃµÄ¹ý³Ì»î¶¯¼ÇÂ¼ÊÇÔõÑùµÄ ?Çë´óÏÀÃÇ¶àÖ¸½Ì.Ð¡µÜ¶àÐ»ÁË .
]]></description>
</item>
</channel>
</rss>