Ò׽ؽØͼÈí¼þ¡¢µ¥Îļþ¡¢Ãâ°²×°¡¢´¿ÂÌÉ«¡¢½ö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ºÁÃ룩


Ïà¹ØÎĵµ£º

CºÍC++ÖеÄÖ÷ÒªÊý¾ÝÀàÐͺÍ×Ö½Ú´óС

CºÍC++ÖеÄÖ÷ÒªÊý¾ÝÀàÐͺÍ×Ö½Ú´óС(
    C/C++µÄд·¨ÊDz»¿ÆѧºÍ²»ÑϽ÷µÄ¡£ÒòΪCºÍC++ËäÈ»ÓïÒ壬µ«ÊÇÉè¼Æ˼ÏëÊǽṹ»¯ÓëÃæÏò¶ÔÏó. C±ê×¼¹æ·¶ÓëC++µÄ±ê×¼¹æ·¶Ò²ÊÇÁ½¸öÎı¾¡£½üÀ´×ÐϸÑо¿ÁËËüÃǵÄÊý¾ÝÀàÐÍ£¬²ÅÖªµÀÆäÀ´ÁúÈ¥Âö£¬ÕæÕý×öµ½ÆäʵËùÒÔÈ»¡£
1¡¢CÓïÑÔ¶¨ÒåÁË5ÖÖ»ù±¾Êý¾ÝÀàÐÍ
  char(×Ö·û), int(Õ ......

´¿Java°æ¹¤ÐÐB2CÍøÒø½Ó¿Úµ÷ÓÃ×ܽá

1.Ê×ÏÈ¿´¶®¹Ù·½Îĵµ
2.icbc.jarÕâ¸öjar°üÒ»¶¨ÒªÒªµ½£¡ÕâÊǽøÐÐbase64¼ÓÃܽâÃÜ£¬ÒÔ¼°
ʹÓù¤ÐÐÖ¤ÊéÇ©ÃûµÄÖØÒª¹¤¾ßÀà¡£
3.²ÉÈ¡´¿Java±àÂ룬Ҫȷ±£ÓöÔÖ¤Ê飬·ÅÔÚDÅ̸ùĿ¼ÏÂ(ÆäËû·¾¶Òà¿É)¡£
4.±àдJSP½Ó¿ÚÒ³Ã棬×ֶαØÐëÓ빤ÐеÄÒ»Ò»¶ÔÓ¦¡£
¶øÇÒÈçtranDataµÈ×ֶνøÐÐbase64¼ÓÃܺó»òÕßÇ©Ãûºó ±ØÐëÒÔ"“Ë«ÒýºÅÀ©ÉϲŠ......

linux³£ÓÃcº¯Êý ÎļþȨÏÞ¿ØÖÆƪ

access£¨ÅжÏÊÇ·ñ¾ßÓдæÈ¡ÎļþµÄȨÏÞ£©
¡¡¡¡Ïà¹Øº¯Êý  stat£¬open£¬chmod£¬chown£¬setuid£¬setgid
¡¡¡¡±íÍ·Îļþ  #include<unistd.h>
¡¡¡¡¶¨Ò庯Êý  int access(const char * pathname,int mode);
¡¡¡¡º¯Êý˵Ã÷  access()»á¼ì²éÊÇ·ñ¿ÉÒÔ¶Á/дijһÒÑ´æÔÚµÄÎļþ¡£²ÎÊýmodeÓм¸ÖÖÇé¿ö×éºÏ£¬R_OK ......

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


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

¹ØÓÚ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ºÅ