¡¾ÀíÂÛ֪ʶƪ¡¿Linux»ìºÏ±à³Ì+log4cpp
ÓÉÓÚҪʹÓõ½log4cppµÄ¿â£¬¶ølog4cµÄ×ÊÁÏÊǷdz£µÄÉÙ£¬Ò²ÀÁµÃÈ¥Ñо¿ËüµÄÓ÷¨£¬ÓÚÊǾ;ö¶¨ÊÔÊÔ»ìºÏ±à³ÌÕßÍæÒâ¡£
Ê×ÏÈÏÈÒýÓÃÏÂC++ËüµÄfather: StroustrupµÄһƪÎÄÕ¡¶C++ Style and Technique FAQ¡·£¨http://www2.research.att.com/~bs/bs_faq2.html£©ÀïµÄһС¸öƬ¶Î£º
Just declare the C function ``extern "C"'' (in your C++ code) and call it (from your C or C++ code). For example:
// C++ code
extern "C" void f(int); // one way
extern "C" { // another way
int g(double);
double h();
};
void code(int i, double d)
{
f(i);
int ii = g(d);
double dd = h();
// ...
}
The definitions of the functions may look like this:
/* C code: */
void f(int i)
{
/* ... */
}
int g(double d)
{
/* ... */
}
double h()
{
/* ... */
}
Note that C++ type rules, not C rules, are used. So you can't call function declared ``extern "C"'' with the wrong number of argument. For example:
// C++ code
void more_code(int i, double d)
{
double dd = h(i,d); // error: unexpected arguments
// ...
}
Just declare the C++ function ``extern "C"'' (in your C++ code) and call it (from your C or C++ code). For example:
// C++ code:
extern "C" void f(int);
void f(int i)
{
// ...
}
Now f() can be used like this:
/* C code: */
void f(int);
void cc(int i)
{
f(i);
/* ... */
}
Naturally, this works only for non-member functions. If you want to call member functions (incl. virtual functions) from C, you need to provide a simple wrapper. For example:
// C++ code:
class C {
// ...
virtual double f(int);
};
extern "C" double call_C_f(C* p, int i) // wrapper function
{
return p->f(i);
}
Now C::f() can be used like this:
/* C code: */
double call_C_f(struct C* p, int i);
void ccc(struct C* p, int i)
{
double d = call_C_f(p,i);
/* ... */
}
If you want to call overloaded functions from C, you must provide wrappers with distinct names for th
Ïà¹ØÎĵµ£º
°²×°
SVN
Õâ¸ö±È½Ï¼òµ¥£¬È¥
ÕâÀïÏÂÔØÔ´Âë
http://subversion.tigris.org/
×Ô¼º±àÒëÏÂ×°ºÃ¾ÍÊÇÁË¡£
¶ÔÓÚ
SVN
µÄÅäÖ㬽¨Òé²é¿´ÈçÏÂÁ¬½Ó£¬ËµµÄºÜÏêϸ£¬ÎÒÒ²²»ÔÚ¶à˵¹þ
~
http://www.ibm.com/developerworks/cn/java/j-lo-apache-subversion/#N10250
²»¹ý£¬ÓÐÒ»µã£¬Éϱß˵µÄ½øÐÐĿ¼·ÃÎÊ¿ØÖÆ
£¬Õâ¸ö±È½Ï ......
LINUX
·þÎñ½éÉÜ£¨ÇåÎú°æ£©
·þÎñÁÐ±í£¨°´×Öĸ˳ÐòÅÅÁУ©
·þÎñÃû
±ØÐ裨ÊÇ/
·ñ£©
ÓÃ;ÃèÊö
×¢½â
acon
·ñ
ÓïÑÔÖ§³Ö
ÌØ±ðÖ§³Ö×óÊÖÊéдÓïÑÔ:
°¢À²®Óï,
²¨Ë¹ÓïºÍÏ£²®À³Óï
acpi
·ñ
µçÔ´¹ÜÀí
ÊÖÌáµçÄÔµç³ØµçÉÈ¼à¿ØÆ÷
acpid
·ñ
¼àÌý¾«Áé½ø³Ì
´Ë½ø³Ì¼àÌý²¢·ÖÅäÄÚºËÖеÄacpi
ʼþ
adsl
·ñ
ÄÚ²¿ADSL
¿ ......
linux²Ã¼ôºÃºó£¬ÏÂÃæ½ô¸ú×ÅÎҾͽ¨Á¢Í¼Ðο⡣ͼÐοâµÄÒÆÖ²Ïà¶ÔÀ´Ëµ±È½Ï·±Ëö¡£ÒòΪÔÚÏàͬӲ¼þ½á¹¹µÄÇé¿öÏÂÊÇ¿ÉÒÔÖ±½Ó¿½±´¹ýÀ´µÄ¡£Îҵķ½·¨ÊÇÏȰÑͼÐοâ×îÖ÷ÒªµÄ³ÌÐòxinit¿½¹ýÀ´£¬È»ºóÔËÐÐËü¸ù¾ÝÈÕÖ¾ÌáʾȱÉÙÊ²Ã´Ò»Ò»ÒÆÖ²¹ýÀ´¾Í¿ÉÒÔÁË¡£Ò»Ð©¿âÎļþºÍһЩ×ÖÌåÅäÖã¬ÊäÈëÊä³öÉ豸µÄÇý¶¯¿½±´¹ýÀ´¾Í¿ÉÒÔÁË£¬µ±È»ÄÚºËÅäÖÃÀïµÄframeb ......
1.´Ó80386¿ªÊ¼£¬Intel´¦ÀíÆ÷µÄÏßÐÔ32±»·ÖΪ3¸öÓò£¬×î¸ßʮλΪ´ËÏßÐÔµØÖ·ÔÚҳĿ¼µÄË÷Òý£»ÖмäʮλΪ´ËÏßÐÔµØÖ·ÔÚÒ³±íÖеÄË÷Òý£»×îµÍ12ΪÎïÀíµØÖ·µÄµÍ12루Ҳ¿ÉÒÔ˵ÊÇÒ³ÄÚÆ«ÒÆÁ¿£©¡£Ã¿¸ö½ø³ÌÒ»¶¨Óи÷×Ô¶ÀÁ¢µÄÒ³±í£¨×¢Ò⣺ÕâÀï˵µÄÊǽø³Ì£¬¶ø²»ÊÇÏ̡߳£ÔÚlinuxÀïÏß³ÌÆäʵ¾ÍÊÇÇáÁ¿¼¶µÄ½ø³Ì£¬ËûÃÇÊÇÁ¬Ò³Ä¿Â¼¶¼ÏàͬµÄ½ø³Ì£¬Ö»ÊÇ ......
Ò»¸öÓû§¡¢Ò»¸ö×é
ÎÒÃÇÀ´¿´Ò»¿´ LinuxȨÏÞºÍËùÓÐȨģÐÍ¡£ÎÒÃÇÒѾ¿´µ½Ã¿¸öÎļþÊôÓÚÒ»¸öÓû§ºÍÒ»¸ö×é¡£ÕâÕýÊÇLinux ÖÐȨÏÞÄ£Ð͵ĺËÐÄ¡£Äú¿ÉÒÔÔÚ ls -lÇåµ¥Öв鿴Óû§ºÍ×飺
$ ls -l /bin/bash
-rwxr-xr-x 1 root wheel 430540 Dec 23 18:27 /bin/bash
ÔÚÕâ¸öÌØÊâµÄʾÀýÖУ¬/bin/bash ¿ÉÖ´ÐÐÎļþÊôÓÚroot Óà ......