c ÓïÑÔ ¼ì²éÀ¨ºÅÆ¥Åä ²»ÄÜÔËÐÐ £¿£¿£¿£¿
¸÷λÇë°ïÎÒ¿´Ò»ÏÂÕâ¸ö¶«Î÷£¬ ÎÒÒªÔÚcÓïÑÔÖÐʵÏÖÀ¨ºÅÆ¥Å䣬Éè¼Æ˼·£º°Ñ´ÓÁ´Õ»ÖÐɨÃèµÃµ½µÄ'}',¡®]',')'ÏÈ´æ´¢µ½¶¯Ì¬ÉêÇëµÄÄÚ´æ¿Õ¼äÖУ¬µ±É¨Ãèµ½¡®{','[','('ʱ ÔÚµ¯³öÏÈÇ°´æ´¢µÄ¡¯£©¡®£¬¡¯]','}' ±È½Ï£¬À´¼ì²âÊÇ·ñÆ¥Åä
µ«ÊÇÔÚÔËÐÐÖгÌÐò²»¶¯ÁË£¬¾ÍÂé·³£¿£¿
linkstack.h:
typedef char ElemData;
typedef struct node
{
ElemData data;
struct node *next;
}LSnode,*Lstack;
typedef struct nodel
{
ElemData tdata;
struct nodel *tnext;
}TLSnode,*TLsnode;
linkedStack.cpp:
#include <stdio.h>
#include <malloc.h>
#include <string.h>
#include"linkstack.h"
Lstack GetData()
{
Lstack head;
LSnode *p;
head = NULL;
for(int i = 0; ;i++)
{
p =(LSnode*)malloc(sizeof(LSnode));
scanf("%c",&p->data);
p->next=head;
head = p;
if(p->data == '\n')
break;
}
return (head);
}
//ÔªËسöÕ»
int display(LSnode *p)
{ int L=0;
LSnode *l;
l=p->next;
while(p!=NULL)
{
printf("%c",p->data);
p=p->next;
L++;
}
printf("\n");
return L;
}
//ËãÊõ±í´ïʽÀ¨ºÅÆ
Ïà¹ØÎÊ´ð£º
ÎÒ×öµÄ
#include <winsock2.h>
#include <stdio.h>
#pragma comment(lib,"ws2_32.lib")
void main()
{
WSADATA wsadata;
WORD dwVersionRequested;
int err ......
<%
Map map = new HashMap();
map.put("1", "2");
map.put("3", "23");
map.put("4", "32");
map.put("23", "42&q ......
ÎÒÏë»ñµÃµ±Ç°µÄʱ¼ä£¬windows mobileÉÏÄÜÓÃtime_t time(time_t *timer)º¯Êý£¬Ìáʾlnk´íÎó¡£ÎªÊ²Ã´²»ÄÜÓÃÄØ£¿ ÐèÒªÔö¼ÓʲôÁ¬½Ó¿âÂð£¿Ãû×ÖÊÇʲô£¿
Çå³þµÄ¼ÇµÃ c¿âµÄtime_tÊÇ¿ÉÒÔʹÓõģ¬Ó¦¸ÃÊÇÆäËûµÄÎÊÌâµ¼Öµġ£
......
1.Ϊʲô¶¨Ò庯Êýʱ£ºfun1 ¿ÉÒÔÕýÈ·µÄ·µ»Ø¶øfun2²»ÐУ¿
char * fun1()
{
char *p = "haha";
return p;
}
char * fun2()
{
char p[] = "haha&quo ......
#include <string.h>
#include <stdio.h>
void main()
{
int i;
char buf[]="abcde";
strncpy(buf,"abc",3);
for(i=0;i <5;i++)
printf(&q ......