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

cĬÈÏÊÇ´«ÖµµÄ

ÔÚcÖУ¬²ÎÊýĬÈÏÊÇ´«ÖµµÄ£¬¼´ÔÚ²ÎÊýÈëջʱ±»¸´ÖÆÒ»·Ý
¡£ÔÚº¯ÊýÀïÃæÐÞ¸ÄÕâЩ²ÎÊý£¬²»»áÓ°ÏìÍâÃæµÄµ÷ÓÃÕß¡£
ÀýÈç
#include <stdio.h>
#include <string.h>
#include <stdlib.h>
void get_str(char * p)
{
    p = (char *)malloc(sizeof("abcd"));
    strcpy(p , "abcd");
    return ;
}
int main()
{
    char * p = NULL;
    get_str(p);
    printf("p = %p\n", p);
    return 0;
}
·ÖÎö£º
ÔÚmainº¯ÊýÀïÃæ³õʼ»¯Ö¸ÕëpλnuLL£¬ËäÈ»get_strº¯ÊýÊǽÓÊܵÄÖ¸Õ룬°´ÕÕÉÏÃæµÄ˵·¨£¬ÎÒÃÇÔÚÕ»Öи´ÖƵÄÊÇpÖ¸ÏòÄÚÈݵĵØÖ·£¬´«¸øº¯Êýget_str£¬ÔÚº¯ÊýÀïÃæÎÒÃÇÓÖÖØÐÂÐÞ¸ÄÁËÕâ¸öµØÖ·£¬¶ø²»ÊÇÐÞ¸ÄÕâ¸öµØÖ·µÄÄÚÈÝ£¬¹ÊÍâÃæ¾Í²»Æð×÷Óá£


Ïà¹ØÎĵµ£º

Symbian C/S »úÖÆ·ÖÎö| symbian os

http://www.devdiv.net/blog/space-14481-do-blog-id-458.html

ÒÔÏ·ÖÎö»ùÓÚ£º
Developer Platform :S60 3rd Edition, Feature Pack 2 SDK
Operating System :Symbian OS v9.3
Ò»£¬ÎªÊ²Ã´ÒªÊ¹ÓÃClient/Server¼Ü¹¹
ÔÚSymibian OSÖÐËùÓеÄÒì²½·þÎñ¶¼ÊÇServerͨ¹ýC/S¼Ü¹¹À´ÊµÏֵġ£ClientÊÇÀûÓÃServerÌṩµÄÌض¨· ......

cÎļþ²Ù×÷: (1)ÎļþµÄ»ù±¾¸ÅÄî

¡¡¡¡Ëùν“Îļþ”ÊÇÖ¸Ò»×éÏà¹ØÊý¾ÝµÄÓÐÐò¼¯ºÏ¡£ Õâ¸öÊý¾Ý¼¯ÓÐÒ»¸öÃû³Æ£¬½Ð×öÎļþÃû¡£ ʵ¼ÊÉÏÔÚÇ°ÃæµÄ¸÷ÕÂÖÐÎÒÃÇÒѾ­¶à´ÎʹÓÃÁËÎļþ£¬ÀýÈçÔ´³ÌÐòÎļþ¡¢Ä¿±êÎļþ¡¢¿ÉÖ´ÐÐÎļþ¡¢¿âÎļþ (Í·Îļþ)µÈ¡£Îļþͨ³£ÊÇפÁôÔÚÍⲿ½éÖÊ(Èç´ÅÅ̵È)Éϵģ¬ ÔÚʹÓÃʱ²Åµ÷ÈëÄÚ´æÖÐÀ´¡£´Ó²»Í¬µÄ½Ç¶È¿É¶ÔÎļþ×÷²»Í¬µÄ·ÖÀà¡£´ÓÓû ......

CµÄscanf()

ºÃ¾ÃûÉÏÀ´ÁË...Óеã¶Ô²»Æð×Ô¼ºµÄÁ¼ÐÄ...
»°ËµÕâ¶Îʱ¼ä¿ì¸øÕâ¸öº¯Êý¸ãËÀÁË...
ÎÒÕÒÕÒ...ÎÒÕÒÎÒÕÒ...ÎÒ¾ÍÊÇÒª°ÑËü¸ø¸ãÃ÷°×ÁË...
»°ËµÇ°¶Îʱ¼äÄǸöËÀÈËËÄÔòÔËËãÒ²°Ñ×Ô¼º¸ãµÃ°ëËÀÁË...¶î...ÏÖÔÚ»¹ÔÚÍ£¹¤×´Ì¬...ÔÎËÀ....
ÔÙ˵scanf(),ÉÏÍøÊÇ¿ÉÒÔÕÒµ½Ð©¶«Î÷....µ«ÊǶ¼²»ÔõôÃ÷°×...´òËã×Ô¼º¸ãÃ÷°×ÁËÔÙÉÏÀ´Ð´¸öÏêϸµãµÄ°É... ......

Cº¯ÊýÖ¸Õë×ܽá

±¾ÎĽöÏÞÓÚC£¬Ö÷Òª×Ô¼ºÀÏÍü¡£±ðµÄ·Ï»°ÉÙ˵¡£
1.Basic
Ê×ÏÈ¿¼ÂǺ¯ÊýÔÚº¯ÊýÌåÄڵĶ¨Ò壬ÈçÏ£º 
#include <stdio.h>
#include <stdlib.h>
 
int main()
{
 int add(int,int); 
 int def(int, int);
 printf("%d\n", add(1,3));
 printf("%d\n", def(3,1));
  ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØͼ | ¸ÓICP±¸09004571ºÅ