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

C/C++¹Ø¼ü×Östatic,const,inline,define,typedef

C/C++¹Ø¼ü×Östatic,const,inline,define,typedef 


document.body.oncopy = function() {
if (window.clipboardData) {
setTimeout(function() {
var text = clipboardData.getData("text");
if (text && text.length > 300) {
text = text + "\r\n\n±¾ÎÄÀ´×ÔCSDN²©¿Í£¬×ªÔØÇë±êÃ÷³ö´¦£º" + location.href;
clipboardData.setData("text", text);
}
}, 100);
}
}

Ò»
static
1)
²úÉú±³¾°
Òý³öÔ­Òò£ºº¯ÊýÄÚ²¿¶¨ÒåµÄ±äÁ¿£¬ÔÚ³ÌÐòÖ´Ðе½ËüµÄ¶¨Ò崦ʱ£¬±àÒëÆ÷ΪËüÔÚÕ»ÉÏ·ÖÅä¿Õ¼ä£¬´ó¼ÒÖªµÀ£¬º¯ÊýÔÚÕ»ÉÏ·ÖÅäµÄ¿Õ¼äÔڴ˺¯ÊýÖ´ÐнáÊøʱ»áÊͷŵô£¬ÕâÑù¾Í²úÉúÁËÒ»¸öÎÊÌâ
:
Èç¹ûÏ뽫º¯ÊýÖд˱äÁ¿µÄÖµ±£´æÖÁÏÂÒ»´Îµ÷ÓÃʱ£¬ÈçºÎʵÏÖ£¿
×îÈÝÒ×Ïëµ½µÄ·½·¨ÊǶ¨ÒåÒ»¸öÈ«¾ÖµÄ±äÁ¿£¬µ«¶¨ÒåΪһ¸öÈ«¾Ö±äÁ¿ÓÐÐí¶àȱµã£¬×îÃ÷ÏÔµÄȱµãÊÇÆÆ»µÁ˴˱äÁ¿µÄ·ÃÎÊ·¶Î§£¨Ê¹µÃÔڴ˺¯ÊýÖж¨ÒåµÄ±äÁ¿£¬²»½ö½öÊܴ˺¯Êý¿ØÖÆ£©¡£
      
ÀàµÄ¾²Ì¬³ÉÔ±Ò²ÊÇÕâ¸öµÀÀí¡£
½â¾ö·½°¸£ºÒò´Ë
C++
ÖÐÒýÈëÁË
static
£¬ÓÃËüÀ´ÐÞÊαäÁ¿£¬ËüÄܹ»Ö¸Ê¾±àÒë
Æ÷½«´Ë±äÁ¿ÔÚ³ÌÐòµÄ¾²Ì¬´æ´¢Çø·ÖÅä¿Õ¼ä±£´æ£¬ÕâÑù¼´ÊµÏÖÁËÄ¿µÄ£¬ÓÖʹµÃ´Ë±äÁ¿µÄ´æÈ¡·¶Î§²»±ä¡£
2)
¾ßÌå×÷ÓÃ
Static
×÷Ó÷ÖÎö×ܽ᣺
static
×ÜÊÇʹµÃ±äÁ¿»ò¶ÔÏóµÄ´æ´¢ÐÎʽ±ä³É¾²Ì¬´æ´¢£¬Á¬½Ó·½Ê½±ä³ÉÄÚ²¿Á¬½Ó£¬¶ÔÓÚ¾Ö²¿±äÁ¿£¨ÒѾ­ÊÇÄÚ²¿Á¬½ÓÁË£©£¬Ëü½ö¸Ä±äÆä´æ´¢·½Ê½£»¶ÔÓÚÈ«¾Ö±äÁ¿£¨ÒѾ­ÊǾ²Ì¬´æ´¢ÁË£©£¬Ëü½ö¸Ä±äÆäÁ¬½ÓÀàÐÍ¡£
(1
Á¬½Ó·½Ê½£º³ÉΪÄÚ²¿Á¬½Ó£»
2
´æ´¢ÐÎʽ£º´æ·ÅÔÚ¾²Ì¬È«¾Ö´æ´¢Çø
)
¶þ
const
1)
²úÉú±³¾°
a) C++
ÓÐÒ»¸öÀàÐÍÑϸñµÄ±àÒëϵͳ£¬ÕâʹµÃ
C++
³ÌÐòµÄ´íÎóÔÚ±àÒë½×¶Î¼´¿É·¢ÏÖÐí¶à£¬´Ó¶øʹµÃ³ö´íÂÊ´óΪ¼õÉÙ£¬Òò´Ë£¬Ò²³ÉΪÁË
C++
Óë
C
Ïà±È£¬ÓÐ×ÅÍ»³öÓŵãµÄÒ»¸ö·½Ãæ¡£
b) C
Öкܳ£¼ûµÄÔ¤´¦ÀíÖ¸Áî
#define VariableName VariableVa


Ïà¹ØÎĵµ£º

º½¿Õ¹«Ë¾¹ÜÀíϵͳ(VC++ ÓëSQL 2005)

ϵͳ»·¾³£ºWindows 7
Èí¼þ»·¾³£ºVisual C++ 2008 SP1 +SQL Server 2005
±¾´ÎÄ¿µÄ£º±àдһ¸öº½¿Õ¹ÜÀíϵͳ
      ÕâÊÇÊý¾Ý¿â¿Î³ÌÉè¼ÆµÄ³É¹û£¬ËäÈ»³É¼¨²»¼Ñ£¬µ«ÊÇ×÷ΪÎÒÓÃVC++ ÒÔÀ´±àдµÄ×î´ó³ÌÐò»¹ÊÇ´«µ½ÍøÉÏ£¬ÒÔ¹©²Î¿¼¡£ÓÃVC++ ×öÊý¾Ý¿âÉè¼Æ²¢²»ÈÝÒ×£¬µ«Ò²²»ÊDz»¿ÉÄÜ¡£ÒÔÏÂÊÇÎҵijÌÐò½çÃ棬ºóÃæ ......

CÓëC++ÖÐ×Ö·ûÖ¸Õë´¦Àí×Ö·û´®

¶¨ÒåÒ»¸ö×Ö·ûÖ¸Õ룬Æä±¾ÖʵĴ¦Àí·½Ê½ÊÇ°´×Ö·ûÊý×é´¦ÀíµÄ£¬ÔÚÄڴ濪±ÙÒ»¸ö×Ö·ûÊý×éÓÃÀ´´æ·Å×Ö·û´®³£Á¿£¬ÕâÑù±Ø¶¨»áÖÕÖ¹·û¡£¶øÕâÑùµÄÌØÐÔÒ²½ö¶ÔÓÚ×Ö·ûÖ¸Õë±äÁ¿¡£
ÔÚCÓïÑÔÖУ¬Í¨¹ýÊý×éÃû»òÕßÖ¸Õë±äÁ¿Êä³öÒ»¸ö×Ö·û´®£¬ÎÒÀí½âΪÁ½¸ö£º×Ö·û´®ÖÕÖ¹·ûµÄ´æÔÚ£»ÒÔ%s¸ñʽµÄÊä³ö·½Ê½¡£
char *p="I love china!";
   & ......

java¿ì »¹ÊÇ c¿ì[c++¿ì],ËÆÊǶø·ÇµÄ̸

    Ê×ÏÈ˵Ã÷Ò»ÏÂÕâ¸ö”¿ì”µÄº¬Òå,ÎÒÏëÒÔÇ°ÄÇЩÌÖÂÛÕâ¸ö»°ÌâµÄÈ˵±È»ÈÏΪÕâ¸ö¿ìÊÇÖ¸³ÌÐòµÄÔËÐÐËÙ¶È,ÖÁÓÚ”Èí¼þ¿ª·¢ËٶȔ¿ÖÅÂÏëҲûÏë,»òÐíÈÏΪÈí¼þ¿ª·¢ËٶȺÍÕâ¸ö»°Ì⳶²»ÉÏÒ»µã¹Øϵ.ÄÇôÕâ¸öÎÊÌâÔÚÍøÉÏËÑËÑ,ËѵÄÒ»´ó¶Ñ,ÄÇЩc/c++ÕóÓªµÄÁÐÁ˺ܶàÀý×ÓÀ´ËµÃ÷c/c++¿ì, javaÕóÓªµÄÒ²ÊÇÈç´ ......

ʹÓÃmex CÉú³ÉMATLABµÄ¹ÉƱÊý¾Ý·ÖÎö½Ó¿Ú

#include "mex.h"
#define DWORD long 
#define NUMBER_OF_STRUCTS (sizeof(friends)/sizeof(struct phonebook))
#define NUMBER_OF_FIELDS (sizeof(field_names)/sizeof(*field_names))
void mexFunction(int nlhs,
    mxArray * plhs[] , int nrhs,const mxArray * pahs[])
{
typedef struc ......

CºÍC++µÄλÔËËã

  ÓдÎÒ»¸öͬÊÂÎÊÎÒ
    swc ^= swc;
  ÊÇʲôÒâ˼,ÎÒÒ²²»ÖªµÀ,²éÁËÏÂ,Òâ˼Ӧ¸ÃÊǽ«swc±äÁ¿Çå0£¬ÒÉ»óµÄÊÇΪʲô¾Í²»ÄÜд³É swc = 0; ÄØ?²»Ã÷°×
  ˳±ã¼Ç¼ÏÂÆäËûµÄ²Ù×÷,Åöµ½ÐµÄÔÙ×·¼Ó:
    swc = ~swc;    //±äÁ¿È¡·´ ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØͼ | ¸ÓICP±¸09004571ºÅ