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

ÎÒµÄѧϰ±Ê¼ÇÈý£º³£¼ûC++ÀàÐͼ°Ï໥ת»»

 C++ÀïÓõ½µÄÊý¾ÝÀàÐÍÓкܶ࣬±à³Ì¹ý³ÌÖкÜÈÝÒ×»ìÓã¬ÏÂÃæ×ۺϿ´µ½µÄ×ÊÁÏ£¨ÓÉÖÔ¸ÐлÎÞ˽¹²ÏíµÄǰ±²ÃÇ£©¶Ô´Ë½øÐмòµ¥µÄ½âÎö
Ò»¡¢1.³£¼û×Ö·ûµÄÒâÒ壺
   L:´ú±íLONG
   W:´ú±íWIDE£¬Ò²¾ÍÊÇOLE,´ú±í¿í×Ö½Ú×Ö·û
   P:´ú±íPOINTER
   A:´ú±íANSIC,Ò²¾ÍÊÇMBCS¶à×Ö½Ú×Ö·û
   S:´ú±íString,ÓÐʱÓÃSTR±íʾ
   C:´ú±íConst
   T:´ú±íÖмäÀàÐÍ£¬¼´Èç¹û¶¨ÒåÁË_UNICODEÔò´ú±í¿í×Ö½Ú£¬Èç¹û¶¨ÒåÁË_MBCSÔò´ú±íÁ˶à×Ö½Ú×Ö·û
   2:´ú±íTO ,Òâζת»»Îª
2. charºÍCString
   ÀýÈç:(1)char * a="hello";
           CString str=a;
        (2)CString str="hello";
           char * a;
           a=str.GetBuffer(str.GetLength());
           str.ReleaseBuffer();
        (3)CString str="hello";
           char a;
           a=str.GetAt(i);
           str.ReleaseBuffer();
        (4)CString str="hello";
           char a[100];
           strcpy(a,str);
        (5)CString mCS=_T("cxl");
           char mch[20];
           memcpy(mch,mCS,20);
        (6)char *ch;
           CString str;
           ch=(LPSTR)(LPCTSTR)str;
3.int,float,doubleºÍCString
   ÀýÈç:(1)CString strval="12.43aa";


Ïà¹ØÎĵµ£º

c/c++Êä³öºº×Ö

1. ʹÓÃTCHARÀàÐÍ£¬¶¨ÒåÔÚtchar.hÖÐ
#include <tchar.h>
#include <stdio.h>
int main()
{
 TCHAR s[] = "Äã";
 printf("%s \n",s);
 return 0;
}
2.¹ØÓÚC++ÖÐÎÄ×Ö·ûµÄ´¦Àí
 
Ò» ÒýÈëÎÊÌâ
´úÂë wchar_t a[3]=L”Öйú”£¬±àÒëʱ³ö´í£¬³ö´íÐÅϢΪ£ºÊý×éÔ½½ç¡£µ«wchar_ ......

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

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

Beautify your c/c++ source code

http://uncrustify.sourceforge.net/
Ident code, aligning on parens, assignments, etc
Align on '=' and variable definitions
Align structure initializers
Align #define stuff
Align backslash-newline stuff
Reformat comments (a little bit)
Fix inter-character spacing
Add or remove parens on return ......

ÔÚ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++ Online Reference


C/C++ Reference 
http://www.cppreference.com/ 
C++ Library Reference 
http://www.cplusplus.com/ref/ 
Standard C++ Library Class Reference at Rogue Wave 
http://www.roguewave.com/support/docs/hppdocs/stdref/ 
Dink ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØÍ¼ | ¸ÓICP±¸09004571ºÅ