Ò׽ؽØͼÈí¼þ¡¢µ¥Îļþ¡¢Ãâ°²×°¡¢´¿ÂÌÉ«¡¢½ö160KB

C/C++º¯Êý²ÎÊý,´«ÖµÓò´«Ö·µÄÇø±ð!!!

/*
* File: main.cpp
* Author: Vicky
*
* Created on 2010Äê5ÔÂ8ÈÕ, ÏÂÎç2:47
*/
#include <iostream>
using namespace std;
class A{
public:
A(){
cout << "Ö´Ðй¹Ô캯Êý´´½¨Ò»¸ö¶ÔÏó" << endl;
}
A(A&){
cout << "Ö´Ðп½±´º¯Êý¿½±´Ò»¸ö¶ÔÏó" << endl;
}
~A(){
cout << "Ö´ÐÐÎö¹¹º¯Êýɾ³ýÒ»¸ö¶ÔÏó" << endl;
}
};
void func(A a){
cout << "µ÷ÓÃÒ»¸ö´«Öµº¯Êý" << endl;
}
void func2(A &a){
cout << "µ÷ÓÃÒ»¸ö´«Ö·º¯Êý" << endl;
}
A getA(A a){
return a;
}
A getA2(A &a){
return a;
}
/**
* ͬgetA4
*/
A* getA3(A &a){
return &a;
}
/**
* ͬgetA3
*/
A* getA4(A *a){
return a;
}
/*
* °´Öµ´«µÝµÄȱµã...µ±´´½¨Ò»¸öеĶÔÏóÖ®ºó,Èç¹û°´Öµ´«µÝ
* ½«¸´Öƹ¹Ô캯Êý´´½¨¶ÔÏóµÄ¸±±¾,¸±±¾ÔÚʹÓÃÍê³ÉÖ®ºó,ÓÖ»áÖ´ÐÐÎö¹¹º¯Êýɾ³ý¸Ã¸±±¾!
*/
int main(int argc, char** argv) {
A a;
func(a);
func(a);
cout << "-------" << endl;
func2(a);
func2(a);
cout << "-------" << endl;
getA(a); // ½«¿½±´2¸ö¶ÔÏóºÍɾ³ý2¸ö¶ÔÏó,1¸ö¶ÔÏóÊÇ×÷Ϊ²ÎÊý´«µÝµÄ,ÁíÍâÒ»¸ö¶ÔÏóÊÇ×÷Ϊֵ·µ»ØµÄ!
cout << "-------" << endl;

getA2(a); // ½«¿½±´1¸ö¶ÔÏóºÍɾ³ý1¸ö¶ÔÏó,¸Ã¶ÔÏóÊÇ×÷Ϊֵ·µ»ØµÄ!
cout << "-------" << endl;
getA3(a); // ½«²»¿½±´aµÄ¶ÔÏó×öΪ²ÎÊý,Ò²²»»á¿½±´aµÄ¶ÔÏó×÷Ϊ·µ»ØÖµ(°üÀ¨É¾³ý)!
getA4(&a);
return (EXIT_SUCCESS);
}
Ö´Ðй¹Ô캯Êý´´½¨Ò»¸ö¶ÔÏó
Ö´Ðп½±´º¯Êý¿½±´Ò»¸ö¶ÔÏó
µ÷ÓÃÒ»¸ö´«Öµº¯Êý
Ö´ÐÐÎö¹¹º¯Êýɾ³ýÒ»¸ö¶ÔÏó
Ö´Ðп½±´º¯Êý¿½±´Ò»¸ö¶ÔÏó
µ÷ÓÃÒ»¸ö´«Öµº¯Êý
Ö´ÐÐÎö¹¹º¯Êýɾ³ýÒ»¸ö¶ÔÏó
-------
µ÷ÓÃÒ»¸ö´«Ö·º¯Êý
µ÷ÓÃÒ»¸ö´«Ö·º¯Êý
-------
Ö´Ðп½±´º¯Êý¿½±´Ò»¸ö¶ÔÏó
Ö´Ðп½±´º¯Êý¿½±´Ò»¸ö¶ÔÏó
Ö´ÐÐÎö¹¹º¯Êýɾ³ýÒ»¸ö¶ÔÏó
Ö´ÐÐÎö¹¹º¯Êýɾ³ýÒ»¸ö¶ÔÏó
-------
Ö´Ðп½±´º¯Êý¿½±´Ò»¸ö¶ÔÏó
Ö´ÐÐÎö¹¹º¯Êýɾ³ýÒ»¸ö¶ÔÏó
-------
Ö´ÐÐÎö¹¹º¯Êýɾ³ýÒ»¸ö¶ÔÏó
ÔËÐгɹ¦£¨×ܼÆʱ¼ä£º 255ºÁÃ룩


Ïà¹ØÎĵµ£º

JSTL ʹÓà c:forEach

ÔÚ Web Ó¦ÓóÌÐò»·¾³ÖУ¬µü´úÖ÷ÒªÓÃÓڷôæºÍÏÔʾÊý¾Ý¼¯£¬Í¨³£ÊÇÒÔÁбí»ò±íÖеÄһϵÁÐÐеÄÐÎʽÏÔʾ¡£ÊµÏÖµü´úÄÚÈݵÄÖ÷Òª JSTL ²Ù×÷ÊÇ <c:forEach>; ¶¨ÖƱê¼Ç¡£¸Ã±ê¼ÇÖ§³ÖÁ½ÖÖ²»Í¬ÑùʽµÄµü´ú£ºÕûÊý·¶Î§Éϵĵü´ú£¨ÀàËÆ Java ÓïÑ﵀ for Óï¾ä£©ºÍ¼¯ºÏÉϵĵü´ú£¨ÀàËÆ Java ÓïÑ﵀ Iterator ºÍ Enumeration Àࣩ¡£
½øÐÐÕûÊ ......

linux emacs c (Ò»£©

²»À뿪EmacsÍê³É¼òµ¥C³ÌÐòµÄ±à¼­±àÒëÔËÐУ¨×ª£©
£¨1£©´ò¿ªEmacs£¬Ö´ÐÐ
$ emacs
£¨2£©½¨Á¢Ò»¸öеijÌÐòÎļþ. Ö´ÐÐ C-x C-f£¬
È»ºóÔÚÆÁÄ»µÄµ×²¿³öÏÖminibuffer£¬¹â±êÌáʾÄãÊäÈëÎļþÃû³Æ£¬
ÎļþÃû³ÆÒª´øÉϺó׺Ãû£¬Èçhello.cpp¡£»Ø³µ£¬È»ºó¿ªÊ¼±à¼­Ô´´úÂë¡£
£¨3£©±àÒë´úÂë¡£Ö´ÐÐEsc-x compile£¬³öÏÖminibuffer£¬ÌáʾÄãÊäÈ ......

cºÍjavaÖеĶþ½øÖÆÎļþ


×î½üÐèҪдһ¶Î³ÌÐò£¬Íê³ÉÒÔÏµĹ¤×÷£¬ÓÃjava½«Êý¾ÝÒÔ¶þ½øÖƵÄÐÎʽдÈëÎļþÖУ¬È»ºóÓÃC¶Á³ö´Ë¶þ½øÖÆÎļþ¡£
¿ªÊ¼µÄʱºòûÓп¼ÂÇ»úÆ÷µÄ×Ö½ÚÐò£¬Ö±½Ó¸ã³ösegment fault.ÏëÁ˺ܾ㬲ÅÃ÷°×Ô­À´ÊÇjavaºÍCµÄ×Ö½ÚÐòÊDz»Ò»ÑùµÄ¡£
javaÖеÄ×Ö½ÚÐòÊÇbig endianµÄ£¬ËüÊÇÓë»úÆ÷Î޹صġ£¶øcµÄ×Ö»úÐòÊÇ»úÆ÷Ïà¹ØµÄ£¬¶øµ±Ç°ÓõĻúÆ÷ÊÇx84 ......

ÔÚEclipseϵÄC/C++¿ª·¢£¨Eclipse3.2 + CDT 3.1£©


ÒªÈàEclipse ¿ÉÒÔ¿ª·¢ C/C++ ³Ìʽ£¬Òª¹ÒÉÏ CDT ²Å¿ÉÒÔ¡£
 
Ê×ÏÈÒªÏÂÔØCDT
 
CDTµÄ×îа汾ÊÇ 3.1.0£¬ËüÖ§³Öeclipse3.2.0£¬ÆäÏÂÔصØÖ·£ºhttp://download3.eclipse.org/tools/cdt/releases/callisto/dist/3.1.0/£¬»òÕßÊǵ½http://www.eclipse.org/cdt/downloads.phpÏÂÔØÆäËü° ......

¹ØÓÚC/C++ÖÐÄÚ´æ¿Õ¼äµÄ»®·Ö

CAPTION: ¹ØÓÚC/C++ÖÐÄÚ´æ¿Õ¼äµÄ»®·Ö
AUTHOR: aIsland Õª×ÔÖйúITʵÑéÊÒ
DATE: 2010-05-30
E-MAIL: aIsland@live.cn
QQ: 418662213
P.S.
     1.Bolanlan|ËæÐÄhigh|aIsland Èý¸öÍøÃû¾ùΪ±¾ÈË
     2.ÉùÃ÷aIsland ËùÊÕ¼µÄËùÓÐÎÄÕÂÆäÖø×÷Ȩ¶¼ÊôÓÚÔ­´´×÷Õß
   ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØͼ | ¸ÓICP±¸09004571ºÅ