C/C++³ÌÐòÔ±ÃæÊÔÌâ
PS:
½ñÌìÈ¥¸£ê¿²Î¼ÓËûÃǹ«Ë¾µÄ±ÊÊÔÁË£¬¿¼µÄ²»ÊǺÜˬ¡£¡£¡£¡£¡£Ò»Ð©ºÜ¼òµ¥µÄ¸ÅÄîÌ⣬²»ÖªµÀÔõô×÷´ð£¬¿´À´Òª¶à¶à¹®¹ÌÏÂÀíÂÛ֪ʶÀ²£¡£¡£¡£¡£¡£¡
ÒÔÏÂת:
ÎÒ´Óʼ¼Êõ¹¤×÷£¬
Õ⼸ÄêµÄÃæÊÔÓë±»ÃæÊÔ×ܽá
ÏÈ˵ÎÒÈ¥±»ÃæÊԵľÑé°É¡£
»Ø´ðÇå³þÁË2¸öÎÊÌ⣬¾ÍÄÜ˳Àû¹ý¹ØÁË¡£
1¡£ÎªÊ²Ã´ÒªÀ뿪ÉÏÒ»¼Ò¹«Ë¾¡£
2¡£¹«Ë¾ÎªÊ²Ã´Òª¹ÍÓ¶Äã¡£
ÎʵÚÒ»¸öÎÊÌâµÄÊÇhr£¨»òÀϰ壩,ºÇºÇ £¬¼´Ê¹Äã¼¼Êõ¹ý¹Ø£¬hrÄÇÀïûÓкõÄÓ°Ï죬½á¹ûÊÇÒ»¸ö×Ö£¬ÄÑ£¡
ÈçºÎ»Ø´ðÄØ£¿ hrÏëÍÆÂÛ³öÄãÔÚËûµÄ¹«Ë¾ÄÜ´ô¶à¾Ã¡£Õâ¸öʱºò£¬ÄãÉõÖÁ¿ÉÒÔÃ÷È·¸æËßËû£¬ÎÒÔÚ¹ó¹«Ë¾ÖÁÉÙÄÜ´ôn£¨n>=1£©Äê----µ±È»£¬ÄãûÓаÑÎյĻ°£¬¾ø¶Ô²»ÄÜÂÒ˵£¬Éç»áÉϻ죬Ҫ½²ÐÅÓõġ£
ÓÐÒ»´Î£¬ÎÒ¾ÍÔÚÕâ¸öÎÊÌâÉϳÔÁË´ó¿÷£¬ÎÒ¿´¹«Ë¾»·¾³»¹²»´í£¬¾ÍÎÒ×Ô×öÖ÷ÕŻشð1Ä꣬½á¹û£¬hrÐÄÄ¿ÖÐÊÇm£¨m>=2£©Ä꣬ºÇºÇ£¬½á¹û¿ÉÏë¶øÖªÁË¡£ÒªÖªµÀ£¬¼¼ÊõÃæÊÔ¶¼¹ý¹ØÁË£¬HrÃæÊÔÊÇ2Ñ¡1£¬ÔڻؼҵÄ·ÉÏ£¬ÎÒÖ»ÄÜÆíµ»¶ÔÊÖ×Ô¶¯·ÅÆú»òÕÒµ½ÁËÆäËû¸üºÃµÄ¹¤×÷¡££º£©
Îʵڶþ¸öÎÊÌâµÄÊǼ¼Êõ¹Ù¡£ÄãÒªÈÃËûÖªµÀÄãÒѾ×ö¹ýÄÄЩÉÌÒµ×÷Æ·¡£Ò»¶¨ÒªÊÇÉÌÒµ×÷Æ·¡£ÔÚÀïÃ渺ÔðÄÄ·½Ãæ¾ßÌ幤×÷£¬¶ÔÓÚÄãÊìϤµÄµØ·½Òª¶à˵¡£×îºÃ¾ÍÊÇÄÜÕùÈ¡±ÊÊÔ»òÉÏ»ú£¬ÒòΪÓÃÓÿÚ˵µÄ»°£¬´ó¼ÒÀí½â¶¼²»Ò»Ñù£¬Îó²î¿ÉÄܴܺ󣬽á¹û¶ÔÄãÏ൱²»Àû¡£ÔÚÕâ¸öÎÊÌâÉÏÎÒÒ²³Ô¹ý¿÷µÄ£¬ÔøÓÐÒ»¸öÎҺܿ´ºÃµÄְ룬ÈÏΪ°ÑÎպܴó£¬ÒµÎñÀí½âÉÏÒ²ºÜÓÐÓÅÊÆ£¬ºÍ¼¼Êõ¹Ùһ̸£¬½á¹ûÊÇgame over¡£ÒªÖªµÀ£¬ÔÚÆäËû¹«Ë¾µÄÉÏ»úºÍ±ÊÊÔÖУ¬ÎÒ¶¼ÄÜÔÚӦƸÕßÖÐÈ¡µÃ¸ß·Ö¡£
ÔÙ˵ÎÒÈ¥ÃæÊÔ±ðÈ˵ľÑé°É¡£
µ±Ê±£¬ÎÒµÄÈÎÎñÊdzöÌ⣬¸ø·Ö¡£ÈôÄã¾õµÃÌâºÜÄÑ£¬ÄÇô£¬ÇëǧÍò²»Òª·ÅÆú£¬ÏÔÈ»£¬ÄãµÄ¶ÔÊÖÒ²¾õµÃÄÑ¡£Ö»Òª¼á³Ö£¬ÎÒ»áÈÏΪÕâÈËÓÐÄÍÐĺÜÒãÁ¦£¬ÔÚÒÔºóµÄ¹¤×÷ÖÐÒ²ÊǺõĺÏ×÷Õß¡£ÌâÒ»¶¨Òª×öÍ꣬±íÏÖ³öÈÏÕæµÄ̬¶È£¬ÈôÓÐÒÉÎÊ»ò¿¨¿Ç£¬»¹¿ÉÒÔÑ°ÇóÃæÊԹٵİïÖú£¬ÕâЩ²»»á¼õ·Ö£¬Ïà·´£¬»áÔö¼ÓÄãºÍËûÃǵĽӴ¥»ú»á£¬ÃæÊÔ¹Ù»áÆÀ¹ÀÄãµÄ¹µÍ¨ÄÜÁ¦¡£
ÓÐÒ»´Î£¬ÓÐ1¸öÈËÀ´ÃæÊÔ£¬ÌâûÓÐÍêÈ«ok,µ«ºÜ¹æ·¶£¬Ì¬¶ÈºÜÈÏÕ棬Ëû°ÑËûÖªµÀµÄ¶¼×öÉÏÈ¥ÁË£¬ÎÒ¸øÁËËû¼¼ÊõÀàµÄ¸ß·Ö¡£ºóÀ´£¬Ë³Àû½øÈ빫˾£¬ÔÙºóÀ´½ø²½ºÜ¿ì£¬³ÉÁËÖØÒª½ÇÉ«¡£
ÈôÎÄÕ¶ÔÄãÓаïÖúµÄ»°£¬ÇëÔÚ´ËÌÖÂÛ¡£
×£Äã³É¹¦
ÃæÊÔÌâ
1.Á´±íºÍÊý×éµÄÇø±ðÔÚÄÄÀ
2.±àдʵÏÖÁ´±íÅÅÐòµÄÒ»ÖÖËã·¨¡£ËµÃ÷ΪʲôÄã»áÑ¡ÔñÓÃÕâÑùµÄ·½·¨£¿
3.±àдʵÏÖÊý×éÅÅÐòµÄÒ»ÖÖËã·¨¡£ËµÃ÷ΪʲôÄã»áÑ¡ÔñÓÃÕâÑùµÄ·½·¨£¿
4.Çë±àдÄÜÖ±½ÓʵÏÖstrstr()º¯Êý¹¦ÄܵĴúÂë¡£
5.±àд·´×ª×Ö·û´®µÄ³
Ïà¹ØÎĵµ£º
ÒÔÏÂÊÇÎҵIJâÊÔociµÄÀý×Ó£¡
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include "oci.h"
static OCIServer *srvhp;
static OCISession *p_session;
static OCIEnv &nb ......
CÓïÑԵıê×¼¿âº¯Êý°üÀ¨Ò»ÏµÁÐÈÕÆÚºÍʱ¼ä´¦Àíº¯Êý£¬ËüÃǶ¼ÔÚÍ·ÎļþÖÐ˵Ã÷¡£ÏÂÃæÁгöÁËÕâЩº¯Êý¡£ÔÚÍ·ÎļþÖж¨ÒåÁËÈýÖÖÀàÐÍ£ºtime_t£¬struct tmºÍclock_t¡£
ÔÚÖÐ˵Ã÷µÄCÓïÑÔʱ¼äº¯Êý & ......
ÓÃVIM±àдC/C++³ÌÐò£¨×ªÔØ£©
ÓÃVIM±àдC/C++³ÌÐò
ViÊÇUnixÏÂ×î³£ÓõÄÎı¾±à¼Æ÷¡£VIM£¨Vi IMproved£©ÔòÊÇËüµÄÔöÇ¿°æ¡£ÓÐÈ˳£³£ÄÃVIMºÍemacs±È½Ï£¬VIM¾¡¹Ü²»ÏóemacsÄÇÑùÓÐÄÇô¶àµÄ¹¦ÄÜ£¬µ«ÊDZÈemacs¸ü·½±ã¡¢ºÃÓá£ÓùýemacsµÄÈ˿϶¨»áΪemacsµÄһЩ¿ì½Ý¼ü¸Ðµ½·³ÄÕ£¬ÓÐʱºòÓÃÕæÏ£Íû×Ô¼ºÓаËÖ»ÊÖ¡£VIMµÄѧϰÇúÏßÒ²²»ÏóemacsÄ ......
ÏÈÓñ´¶ûµÄÒ»µÀ±ÊÊÔÌâ¼òÒªµÄ˵Ã÷һϰɣº
¡¾Ì⡿˵Ã÷ÒÔϳÌÐò¡£
#include
int main(void)
{
unsigned int a[3] = {0x01020304, 0x05060708, 0x090a0b0c};
unsigned int *p = (unsigned int *)((int)a +1);¢Ù
printf("%x\n", *p);
return 0;
}
¡¾ÌâÄ¿½âÎö¡¿
Õâ¶Î³ÌÐòµÄÊä³ö½á¹ûÓ¦ ......