C/C++ÃüÃû¹æÔò
ÔÚÈí¼þ¿ª·¢ÕâÒ»¸ß¶È³éÏó¶øÇÒÊ®·Ö¸´ÔӵĻÖУ¬ÃüÃû¹æÔòµÄÖØÒªÐÔ¸üÏÔµÃÓÈΪͻ³ö¡£Ò»Ì׶¨ÒåÁ¼ºÃ²¢ÇÒÍêÕûµÄ¡¢ÔÚÕû¸öÏîÄ¿ÖÐͳһʹÓõÄÃüÃû¹æ·¶½«´ó´óÌáÉýÔ´´úÂëµÄ¿É¶ÁÐÔºÍÈí¼þµÄ¿Éά»¤ÐÔ¡£
ÔÚÒýÈëϸ½Ú֮ǰ£¬ÏÈ˵Ã÷Ò»ÏÂÃüÃû¹æ·¶µÄÕûÌåÔÔò£º
ͬһÐÔ
ÔÚ±àдһ¸ö×ÓÄ£¿é»òÅÉÉúÀàµÄʱºò£¬Òª×ñÑÆä»ùÀà»òÕûÌåÄ£¿éµÄÃüÃû·ç¸ñ£¬±£³ÖÃüÃû·ç¸ñÔÚÕû¸öÄ£¿éÖеÄͬһÐÔ¡£
±êʶ·û×é³É
±êʶ·û²ÉÓÃÓ¢Îĵ¥´Ê»òÆä×éºÏ£¬Ó¦µ±Ö±¹ÛÇÒ¿ÉÒÔÆ´¶Á£¬¿ÉÍûÎÄÖªÒ⣬ÓôÊÓ¦µ±×¼È·¡£
×îС»¯³¤¶È && ×î´ó»¯ÐÅÏ¢Á¿ÔÔò
ÔÚ±£³ÖÒ»¸ö±êʶ·ûÒâ˼Ã÷È·µÄͬʱ£¬Ó¦µ±¾¡Á¿Ëõ¶ÌÆ䳤¶È¡£
±ÜÃâ¹ýÓÚÏàËÆ
²»Òª³öÏÖ½ö¿¿´óСдÇø·ÖµÄÏàËƵıêʶ·û£¬ÀýÈç“i”Óë“I”£¬“function”Óë“Function”µÈµÈ¡£
±ÜÃâÔÚ²»Í¬¼¶±ðµÄ×÷ÓÃÓòÖÐÖØÃû
³ÌÐòÖв»Òª³öÏÖÃû×ÖÍêÈ«ÏàͬµÄ¾Ö²¿±äÁ¿ºÍÈ«¾Ö±äÁ¿£¬¾¡¹ÜÁ½ÕßµÄ×÷ÓÃÓò²»Í¬¶ø²»»á·¢ÉúÓï·¨´íÎ󣬵«ÈÝÒ×ʹÈËÎó½â¡£
ÕýÈ·ÃüÃû¾ßÓл¥³âÒâÒåµÄ±êʶ·û
ÓÃÕýÈ·µÄ·´Òå´Ê×éÃüÃû¾ßÓл¥³âÒâÒåµÄ±êʶ·û£¬È磺"nMinValue"ºÍ"nMaxValue"£¬"GetName()" ºÍ "SetName()" ....
±ÜÃâÃû×ÖÖгöÏÖÊý×Ö±àºÅ
¾¡Á¿±ÜÃâÃû×ÖÖгöÏÖÊý×Ö±àºÅ£¬ÈçValue1,Value2µÈ£¬³ý·ÇÂß¼ÉϵÄÈ·ÐèÒª±àºÅ¡£ÕâÊÇΪÁË·ÀÖ¹³ÌÐòԱ͵ÀÁ£¬²»¿ÏΪÃüÃû¶¯ÄÔ½î¶øµ¼Ö²úÉúÎÞÒâÒåµÄÃû×Ö£¨ÒòΪÓÃÊý×Ö±àºÅ×îÊ¡Ê£©¡£
Àà/½á¹¹
³ýÁËÒì³£ÀàµÈ¸ö±ðÇé¿ö£¨²»Ï£ÍûÓû§°Ñ¸ÃÀà¿´×÷Ò»¸öÆÕͨµÄ¡¢Õý³£µÄÀàÖ®Çé¿ö£©Í⣬C++Àà/½á¹¹
µÄÃüÃûÓ¦¸Ã×ñÑÒÔÏÂ×¼Ôò£º
C++Àà/½á¹¹µÄÃüÃû
ÀàµÄÃû³Æ¶¼ÒªÒÔ´óд×Öĸ“C”¿ªÍ·£¬ºó¸úÒ»¸ö»ò¶à¸öµ¥´Ê¡£Îª±ãÓڽ綨£¬Ã¿¸öµ¥´ÊµÄÊ××ÖĸҪ´óд¡£
ÍƼöµÄ×é³ÉÐÎʽ
ÀàµÄÃüÃûÍƼöÓÃ"Ãû´Ê"»ò"ÐÎÈÝ´Ê£«Ãû´Ê"µÄÐÎʽ£¬ÀýÈ磺"CAnalyzer", "CFastVector" ....
²»Í¬ÓÚC++ÀàµÄ¸ÅÄ´«Í³µÄC½á¹¹ÌåÖ»ÊÇÒ»ÖÖ½«Ò»×éÊý¾ÝÀ¦°óÔÚÒ»ÆðµÄ·½Ê½¡£´«Í³C½á¹¹ÌåµÄÃüÃû¹æÔòΪ£º
´«Í³C½á¹¹ÌåµÄÃüÃû
´«Í³C½á¹¹ÌåµÄÃû³ÆÈ«²¿ÓÉ´óд×Öĸ×é³É£¬µ¥´Ê¼äʹÓÃÏ»®Ï߽綨£¬ÀýÈ磺"SERVICE_STATUS", "DRIVER_INFO" ....
º¯Êý
º¯ÊýµÄÃüÃû
º¯ÊýµÄÃû³ÆÓÉÒ»¸ö»ò¶à¸öµ¥´Ê×é³É¡£Îª±ãÓڽ綨£¬Ã¿¸öµ¥´ÊµÄÊ××ÖĸҪ´óд¡£
ÍƼöµÄ×é³ÉÐÎʽ
º¯ÊýÃûÓ¦µ±Ê¹ÓÃ"¶¯´Ê"»òÕß"¶¯´Ê£«Ãû´Ê"£¨¶¯±ö´Ê×飩µÄÐÎʽ¡£ÀýÈ磺"GetName()", "SetValue()", "Erase()", "Reserve()" ....
±£»¤³ÉÔ±º¯Êý
±£»¤³ÉÔ±º¯ÊýµÄ¿ªÍ·Ó¦µ±¼ÓÉÏÒ»¸öÏ»®Ïß“_”ÒÔʾÇø±ð£¬ÀýÈ磺"_SetState()"
Ïà¹ØÎĵµ£º
#include
void printptr(int *i){
printf("&i of printfptr = %#X\n",&i);
printf("i of printfptr = %#X\n",i);
printf("*i of printfptr = %d\n",*i);
printf("i+1 of printfptr = %#X\n",i+1);
printf("*(i + 1) of printfptr = %d\n",*(i ......
ÔÎĵØÖ·£ºhttp://www.layz.net/blog/user1/xuanxuan/archives/2006/67.html
ÔÚC++ÖУ¬ÓÐÒ»¸östreamÕâ¸öÀ࣬ËùÓеÄI/O¶¼ÒÔÕâ¸ö“Á÷”ÀàΪ»ù´¡µÄ£¬°üÀ¨ÎÒÃÇÒªÈÏʶµÄÎļþI/O£¬streamÕâ¸öÀàÓÐÁ½¸öÖØÒªµÄÔËËã·û£º
1¡¢²åÈëÆ÷(<<)
¡¡¡¡ÏòÁ÷Êä³öÊý¾Ý¡£±ÈÈç˵ϵͳÓÐÒ»¸öĬÈϵıê×¼Êä³öÁ÷(cout)£ ......
±¾ÎĹؼü´Ê£º c++ º¬Òå
1.ÒýÑÔ
C++ÓïÑԵĴ´½¨³õÖÔÊÇ“a better C”£¬µ«ÊÇÕâ²¢²»Òâζ×ÅC++ÖÐÀàËÆCÓïÑÔµÄÈ«¾Ö±äÁ¿ºÍº¯ÊýËù²ÉÓõıàÒëºÍÁ¬½Ó·½Ê½ÓëCÓïÑÔÍêÈ«Ïàͬ¡£×÷ΪһÖÖÓûÓëC¼æÈݵÄÓïÑÔ£¬C++±£ÁôÁËÒ»²¿·Ö¹ý³ÌʽÓïÑÔµÄÌص㣨±»ÊÀÈ˳ÆΪ“²»³¹µ×µØÃæÏò¶ÔÏ󔣩£¬Òò¶øËü¿ÉÒÔ¶¨Òå²»ÊôÓÚÈκÎÀ ......
#include <stdio.h>
#include <string.h>
#include <stdlib.h>
EXEC SQL include sqlca;
EXEC ORACLE OPTION (RELEASE_CURSOR = YES);
EXEC SQL BEGIN DECLARE SECTION;
& ......