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

C/C++/VC ʵÏÖ×Ö·û´®ÄæתµÄ¶àÖÖ·½·¨

/¼ÓÁËÏÂÃæÁ½¸öÍ·Îļþ£¬ÊÇΪÁËÔÚWin32¹¤³ÌÖÐʹÓÃMFCµÄÌØÐÔ!
#include <afx.h>
#include <afxwin.h>
#include "stdio.h"
#include "conio.h"
////¼ÓÁËÏÂÃæÁ½¾ä£¬ÊÇΪÁËÄܹ»ÓÃstring(basic_stringÀàÐÍ)
#include <string>
using namespace std;
int main(int argc, char* argv[])
{
// string  _strtemp = "1111";
// TRACE("\n string = %s \n",_strtemp.c_str() );
// printf("\n string = %s \n",_strtemp.c_str() );
// printf("\n Hello World! \n");
// getch();
 CString  sTemp;
 sTemp.Format("jkgja");
 AfxMessageBox(sTemp);
 return 0;
}
/************************************************************************/
/*     ÊµÏÖ×Ö·û´®Äæת                                      */
/************************************************************************/
/////·½°¸Ò» Óô¿Cº¯ÊýʵÏÖ
/*#include <iostream>
#include <string>
using namespace std;
int main()
{
    string str = "abcdefghijklmn";
 cout<<str.c_str()<<endl;
    cout<<strrev(strdup(str.c_str()))<<endl;
 system("pause");
 return 0;
}*/
///// ·½°¸¶þ ÓÃSTLº¯ÊýʵÏÖ
// reverse_copy.cpp
// compile with: /EHsc
// Illustrates how to use the reverse_copy function.
//
// Functions:
//    reverse_copy - Reverse a sequence, copy the results to another
//                   same-sized sequence.
//
//////////////////////////////////////////////////////////////////////
/*
// disable warning C4786: symbol greater than 255 character,
// okay to ignore
#pragma warning(disable


Ïà¹ØÎĵµ£º

C ÖÐtypedefµÄһЩʹÓÃ

1. »ù±¾½âÊÍ
¡¡¡¡typedefΪCÓïÑԵĹؼü×Ö£¬×÷ÓÃÊÇΪһÖÖÊý¾ÝÀàÐͶ¨ÒåÒ»¸öÐÂÃû×Ö¡£ÕâÀïµÄÊý¾ÝÀàÐÍ°üÀ¨ÄÚ²¿Êý¾ÝÀàÐÍ£¨int,charµÈ£©ºÍ×Ô¶¨ÒåµÄÊý¾ÝÀàÐÍ£¨structµÈ£©¡£
¡¡¡¡ÔÚ±à³ÌÖÐʹÓÃtypedefÄ¿µÄÒ»°ãÓÐÁ½¸ö£¬Ò»¸öÊǸø±äÁ¿Ò»¸öÒ×¼ÇÇÒÒâÒåÃ÷È·µÄÐÂÃû×Ö£¬ÁíÒ»¸öÊǼò»¯Ò»Ð©±È½Ï¸´ÔÓµÄÀàÐÍÉùÃ÷¡£
¡¡¡¡ÖÁÓÚtypedefÓÐʲô΢ÃîÖ®´ ......

C±ê×¼¿âÔ´Âë½âÆÊ(14)£ºÍ¨Óú¯Êýstdlib.h

    ͨÓú¯Êý¿âÔÚÍ·Îļþstdlib.hÖÐÉùÃ÷£¬±È½ÏÅÓ´ó£¬Ö÷Òª·ÖΪÒÔϼ¸´óÀࣺ´æ´¢·ÖÅä¡¢Ëæ»úÊýÉú³É¡¢Êý×Öת»»ÓëÕûÐÍÔËËã¡¢³ÌÐòÍ˳öÓë»·¾³Í¨ÐÅ¡¢ËÑË÷ÓëÅÅÐò¡¢¶à×Ö½ÚÓë¿í×Ö·ûµÄת»»¡£ÓÉÓÚ¼³¼°µ½´æ´¢·ÖÅä¡¢»·¾³Í¨Ðŵȣ¬Òò´ËËüÃǵĴó¶àÊýÒ²ÒÀÀµÓÚ²Ù×÷ϵͳ¡£glibcÖУ¬Í¨Óú¯Êý¿âµÄºËÐÄʵÏÖÔÚstdlibºÍmallocÁ½¸öĿ¼Ï ......

LinuxÏ»ñµÃϵͳʱ¼äµÄCÓïÑÔµÄʵÏÖ·½·¨

 LinuxÏ»ñµÃϵͳʱ¼äµÄCÓïÑÔµÄʵÏÖ·½·¨
#include<time.h>  //CÓïÑÔµÄÍ·Îļþ
#include<stdio.h>  //CÓïÑÔµÄI/O
void main()
{
time_t now;    //ʵÀý»¯time_t½á¹¹
struct tm  *timenow;    //ʵÀý»¯tm½á¹¹Ö¸Õë
time(&now);
//timeº¯Êý¶ÁÈ¡ÏÖÔÚµ ......

Windows via C/C++£ºÏ̵߳÷¶È——¸ÅÊö

»ùÓÚÓÅÏȼ¶µÄ²Ù×÷ϵͳ£¨preemptive operating system£©±ØÐëʹÓÃijÖÖËã·¨ÒÔ¾ö¶¨CPUÈçºÎµ÷¶ÈϵͳÖеÄỊ̈߳¬±¾Õ½«ÌÖÂÛWindows VistaʹÓõĵ÷¶ÈËã·¨¡£ ÎÒÃÇ֮ǰÌÖÂÛ¹ýÏ̵߳ÄÉÏÏÂÎĽṹCONTEXT£¬ÆäÖк¬ÓÐÏß³Ì×îºóÒ»´ÎÖ´ÐÐʱCPU¼Ä´æÆ÷×éµÄ״̬¡£ ²Ù×÷ϵͳÿ20ºÁÃë¼ì²éϵͳÖÐËùÓÐÏß³ÌÄں˶ÔÏóµÄ״̬£¬ÆäÖÐһЩ¶ÔÏó±»ÈÏΪÊǿɵ÷¶È£ ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØͼ | ¸ÓICP±¸09004571ºÅ