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

ÈçºÎÔÚLinuxʹÓÃEclipse + CDT¿ª·¢C/C++³ÌÐò?

A. ΪʲôҪÔÚLinuxʹÓÃEclipse¿ª·¢C/C++³ÌÐò?
LinuxÊÇÒ»¸öÒÔC/C++¿ª·¢ÎªÖ÷µÄƽ̨£¬ÎÞÂÛÊÇKernel»òÊÇApplication£¬Ö÷Òª¶¼Ê¹ÓÃC/C++¿ª·¢¡£´«Í³ÔÚLinuxÏ¿ª·¢³ÌÐò£¬ÊÇÔÚÎÄ×ÖģʽÏ£¬ÀûÓÃviµÈÎÄ×ֱ༭Æ÷׫дC/C++³ÌÐò´æÅ̺ó£¬ÔÚCommand lineÏÂʹÓÃgcc±àÒ룬ÈôÒªdebug£¬ÔòʹÓÃgdb¡£
ÕâÖÖ¿ª·¢·½Ê½Éú²úÁ¦²¢²»¸ß£¬ÈôÖ»ÊÇ¿ª·¢Ñ§ ......

ÉîÈëC/C++Ö®»ùÓÚCheckStackVarsµÄ°²È«¼ì²é£¨VS2008£©

×î½üһֱæ±ÏÒµµÄÏà¹ØÊÂÇ飬¼ÓÉϹ¤×÷£¬×ªÑۼ䣬ÓÖµ½Ôµ×ÁË£¬Ö®Ç°³ÐŵµÄÿÔÂһƪ²©ÎÄ£¬Ç°¼¸Ìì¾ÍÒ»Ö±ÔÚÑ°ÕÒµ½µ×Ҫдʲô£¬½üÁ½ÌìÓÖͻȻ·¢ÏÖÓкܶණÎ÷¿ÉÒÔд¡£±¾Æª¾ÍÏÈÑÓÐø֮ǰµÄһƪ»ùÓÚCookieµÄ°²È«¼ì²é»úÖÆ£¨ÉîÈëC/C++Ö®»ùÓÚCookieµÄ°²È«¼ì²é£¨VS2005£©£©À´½éÉÜÏÂÁíÍâÒ»ÖÖÔÚDEBUG°æ±¾Ïµİ²È«¼ì²é£¬Ò²¾ÍÊÇCheckStackVars¼ì ......

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 << "Ö´Ðп½±´º¯Êý¿½±´Ò»¸ö¶ ......

VC++µÄADOÁ¬½ÓSQL Server²½Öè

 1£ºSQL  ServerÊý¾Ý¿âÅäÖÃ
 
 
 
¿ªÆô·þÎñÆ÷
 
 
ÍÐÅÌÏÔʾ·þÎñÆ÷Æô¶¯
 
 
 
2:ÔÚStaAfx.h ÖÐÌí¼ÓÈçÏ´úÂë
#import "C:\\Program Files\\Common Files\\System\\ado\\msado15.dll" no_namespace      rename("EOF","adoEOF")rena ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØͼ | ¸ÓICP±¸09004571ºÅ