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

C½øÕ»³öջʱ³öÎÊÌâÁË£¡£¡£¡£¡ - C/C++ / CÓïÑÔ

C/C++ code:
#include<stdio.h>
#define MAXN 26
char stack[MAXN];
int top=0;

int push(x);
int pop(p_y);

void main()
{
char mpush=3;
char *mpop;
*mpop=0;
// printf("%d\n",*mpop);
push(mpush);
pop(mpop);
printf("%d\n",*mpop);


}

int push(x)
char x;
{
if(top>=MAXN)
return (1);
stack[top++]=x;
return(0);
}

int pop(p_y)//±ØÐëΪÒýÓÃÀàÐ͵ÄÐβÎ
char *p_y;
{
if(top==0)
return(1);
*p_y=stack[--top];
return (0);
}




´óÏÀÃÇÃǸø¿´¿´Õâ¶Î´úÂëÓÐʲôÎÊÌâ
£¿

char *mpop;
*mpop=0; —— Äã¸øÒ»¸öûÓзÖÅä¿Õ¼äµÄÄڴ渳ֵ£¬Óе㲻ºÏÊÊ
 

C/C++ code:

#include<stdio.h>
#include<stdlib.h>

#define MAXN 26

char stack[MAXN];
int top=0;

int push(char x);
int pop(char *p_y);

void main()
{
char mpush=3;
char *mpop = (char *)malloc(sizeof(char)); /*·ÖÅäÄÚ´æ*/
*mpop=0;
// printf("%d\n",*mpop);
push(mpush);
pop(mpop);
printf("%d\n",*mpop);
free(mpop);
}

int push(char x)
{
if(top>=MAXN)
return(1);
stack[top++]=x;
return(0);
}

int pop(char *p_y)//±ØÐëΪÒýÓÃÀàÐ͵


Ïà¹ØÎÊ´ð£º

linux»·¾³ÏÂgethostbynameº¯ÊýÎÊÌâ - C/C++ / CÓïÑÔ

дÁ˸ö²âÊÔ³ÌÐòÈçÏÂ
   
  struct hostent *hp; 
char AlarmDevIP[20];  
  int x2;

hp = gethostbyname("www.google.com");
if (hp)
{ ......

CµÄѧϰ;¾¶ - C/C++ / ÐÂÊÖÀÖÔ°

ÎÒֻѧ¹ýÇ廪À¶·âÃæµÄCÓïÑÔ»ù´¡£¬Ïë¸üÉîÈëµÄѧϰ£¬¸Ã¿´Ê²Ã´ÊéºÃ£¿
C Primer Plus
C³ÌÐòÉè¼ÆÓïÑÔ(µÚ2°æаæ)
CÓïÑÔ³ÌÐòÉè¼Æ_ÏÖ´ú·½·¨
CÓïÑԲο¼ÊÖ²áµÚÎå°æ
CÓïÑÔ´óÈ«
CºÍÖ¸Õë
CÏÝÚåÓëȱÏÝ
Cר¼Ò±à³Ì

......

Çó½Ìc/c++ÓïÑÔÏà¹ØÎÊÌâ - C/C++ / CÓïÑÔ

ÓÐÒ»10*10¾ØÕ󣬳ýÈ¥µÚÒ»¸öµã£¨0£¬0£©ºÍ×îºóÒ»µã£¨9£¬9£©£¬»¹Óа˸öµãΪ1£¬ÆäËû¶¼Îª0£¬ÒªÇóÓöþάÊý×é±íʾ¡£°Ë¸öµãÊÇËæ»úÉú³ÉµÄ£¬±àдÏà¹Ø³ÌÐò±íʾ¾ØÕóËùÓпÉÄÜÇé¿ö¡£
ÕæÐÄÇó½Ì¸÷λ¸ßÊÖ£¬°¥£¡±¾ÈËÌ«²ËÁË£¡ºÇºÇ£¡
......

Ϊʲôxml²»ÄÜÏÔʾ°¢À­²®ÎÄ - C/C++ / C++ ÓïÑÔ

ΪʲôÎҵijÌÐòµ÷ÓÃXMLÅäÖÃÎļþÖеİ¢À­²®ÎÄÏÔʾ²»³öÀ´£¿ÆäËûµÄÓïÖÖ¶¼¿ÉÒÔ£¬ÈçÖÐÎÄ£¬Ó¢ÎÄ£¬µÂÎĶ¼¿É¡£
ÎÒ½«XMLµÄ±àÂë¸ÄΪutf-8ºÍunicodeµÄµ½µÃ½á¹û¶¼Ò»Ñù.
°¢À­²®ÎĵÄ×Ö¿âÄãÓÐô£¿

ÓÐ,ÎÒµÄEXEÊÇ·ÅÔÚpc»úÉÏÖ´Ðе ......

CÖÐÈçºÎ´Ó´íÎóÖлָ´ - C/C++ / CÓïÑÔ

±ÈÈçµ±³ÌÐò³öÏֶδíÎóʱ£¬ÈçºÎÈóÌÐòÖØпªÊ¼£¬¶ø²»ÊDZ»ÏµÍ³ÖÕÖ¹¡£
ÄãÏëÒì³£´¦ÀíÂð£¿
C²»Ö§³Ö¡£
ÔÙ˵£¬Òì³£ºÍ´íÎóÊDz»Í¬µÄ¡£
¶Î´íÎó¾ÍÓ¦¸ÃÖÕÖ¹¡£

assert()
abort()
exit()

µ±³ÌÐò³öÏֶδíÎóʱ,ÎÞ· ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØͼ | ¸ÓICP±¸09004571ºÅ