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

c ÓïÑÔÖеĴ«ÖµÓë´«ÒýÓÃ


#include<stdio.h>
int cubeByValue(int n);
int main(){
    int number = 5 ;
    printf("The original value of number is %d\n",number);
    number = cubeByValue(number);   
    printf("The new  value of number is %d\n",number);
    return 0;
}
int cubeByValue(int n){
    return n*n ;
}
#include<stdio.h>
void cubeByReference(int *nPtr);
int main(){
    int number = 5 ;
    printf("The original value of number is %d\n",number);
    cubeByReference( &number );
    printf("The new value of number is %d\n",number);
    return 0;
}
void cubeByReference(int *nPtr){
    *nPtr = *nPtr * *nPtr ;
}


Ïà¹ØÎĵµ£º

cÖ¸Õë

cÖ¸ÕëµÄÔËËãÓÐʱºò»¹ÊǺÜÃÔ»óÈ˵ġ£
ÀýÈ磺
struct student {
int num;
int score;
int length;
};
struct student *pt;
pt = (struct student *) malloc(sizeof(struct student));
pt->num = 1;
pt->score = 90;
pt->length = 3 * sizeof(int);
printf("pt length:%d\n", *pt);
pt = (int ......

×Ô¼ºÕûÀíµÄ¹ØÓÚCµÄһЩ×Ö·û´®´¦Àíº¯Êý

¼øÓÚÔÚÓÃCÓïÑÔдһЩ×Ö·û´®´¦ÀíµÄ³ÌÐòʱÖÖÖֵIJ»±ã,±¾È˼áÐÅ"Ä¥µ¶²»Îó¿³²ñ¹¦"Õâ¸öÐÅÌõ,ÓÚÊÇÔÚרÃÅ
½øÐÐÁËÒ»´ÎÄ¥¶ÔCÓïÑÔµÄÄ¥µ¶,дÁËһЩ×Ö·û´®µÄ´¦Àíº¯Êý, ·½±ãÍøÓÑʹÓÃ, ´ó¼ÒÓкõĽâ¾ö·½·¨Ò²Çë¸æÖªÒ»ÏÂ.
¡¡¡¡¡¡¡¡ÎÒ¹À¼ÆÓÐһЩCµÄ¿âÖп϶¨ÓбÈÎÒÕâ¸üºÃµÄº¯Êý, µ«ÊDZ¾ÈËûÓÐÕÒµ½, Íû"ÐмÒ"¸æÖª.
#include <string.h> ......

linuxÏÂcÓïÑÔÁ¬½ÓmysqlÊý¾Ý¿â

ÔÚFC8ÖÐĬÈϰ²×°µÄÓÐmysql£¬Ã»Óеϰ¿ÉÒԺܷ½±ãµÄ°²×°Ï¡£
ĬÈϵÄmysqlµÄincludeÎļþĿ¼ÔÚ/usr/include/mysql
ĬÈϵÄmysqlµÄlibÎļþ¼ÐÔÚ/usr/lib/mysql
ÕâÁ½¸öĿ¼ÔÚÎÒÃDZàÒëʱºòÐèÒªµ½¡£
ÎҵIJâÊÔÓõÄC´úÂëΪ£º
££include <stdio.h>
#include <stdlib.h>
#include <mysql.h>
#define CONN_HOST ......

c/c++Ô´´úÂë

C/C++ÊÇ×îÖ÷ÒªµÄ±à³ÌÓïÑÔ¡£ÕâÀïÁгöÁË50ÃûÓÅÐãÍøÕ¾ºÍÍøÒ³Çåµ¥£¬ÕâÐ©ÍøÕ¾Ìṩc/c++Ô´´úÂë¡£Õâ·ÝÇåµ¥ÌṩÁËÔ´´úÂëµÄÁ´½ÓÒÔ¼°ËüÃǵÄС˵Ã÷¡£ÎÒÒѾ¡Á¦°üÀ¨×î¼ÑµÄC/C++Ô´´úÂëµÄÍøÕ¾¡£Õâ²»ÊÇÒ»¸öÍêÕûµÄÇåµ¥£¬ÄúÓн¨Òé¿ÉÒÔÁªÏµÎÒ£¬ÎÒ½«»¶Ó­ÄúµÄ½¨Ò飬ÒÔ½øÒ»²½¼ÓÇ¿Õâ·½ÃæµÄÇåµ¥¡£
1¡¢http://snippets.dzone.com/tag/c/ --ÊýÒÔǧ¼Æ ......

C/C++µ¥Ôª²âÊÔÀíÂÛ¾«Òª£¨Æß£©

2.2 ½â¾ö¿É²âÐÔÎÊÌâ
    ÉÏÒ»½Ú¾ßÌå·ÖÎöÁ˿ɲâÐÔÎÊÌ⣬½ÓÏÂÀ´£¬ÎÒÃÇÀ´¿´¿´ÈçºÎ½â¾öÕâЩÎÊÌâ¡£ÏÂͼÖУ¬²ÊÉ«µÄ²¿·ÖÊÇÐèÒª½â¾öµÄ¿É²âÐԵľßÌåµÄÎÊÌâ¡£
   
ÓëÆäËû´úÂë¸ôÀë
    ΪÁËÌá¸ßЧÂÊ£¬Ó¦¸ÃÒ»´ÎÐÔ½«Ò»Î»¹¤³Ìʦ¸ºÔðµÄ²âÊÔÈÎÎñ¸ôÀë³öÀ´¡£¸ôÀëʱ£¬Ó¦°ÑÔ´Îļþ·ÖΪÈýÀࣺ± ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØÍ¼ | ¸ÓICP±¸09004571ºÅ