ÃÔ¹¬¿ÎÉè ¾ø¶ÔÔ´´ C°æ
typedef struct StackNode
{
ElemType data;
StackNode *next;
)StackNode, *LinkType; //½áµãÀàÐÍ£¬Ö¸ÕëÀàÐÍ
typedef struct
{
LinkType top;
int size;
}Stack; //Õ»ÀàÐÍ
//Õ»µÄ»ù±¾²Ù×÷ÈçÏÂ
Status InitStack(Stack &s)
{
s.top=NULL;
s.size=0;
return ok;
}
Status Push(Stack &s,ElemType e)
{
p=(LinkType*)malloc( sizeof(StackNode) );
if(!p) return FALSE;
p.data=e;
p.next=s.top;
s.top=p;
s.size++;
return TURE;
}
Status StackEmpty(Stack &s)
{
if(s.top==NULL) return TURE;
else return FALSE;
}
Status GetTop(Stack &s,ElemType e)
{
if( s.top==NULL ) return ERROR;
e=s.top->data;
return OK;
}
Status Pop(Stack &s)
{
if( s.top==NULL ) return ERROR;
p=s.top;
s.top=p->next;
s.size--;
free(p);
return OK;
}
Status DestroyStack(Stack &s)
{
Ïà¹ØÎĵµ£º
C/C++ÄÚ´æÓëÔËÐÐʱÉîÈëÑо¿ [×÷ÕßJean.Love]
-----------------------------------------------------------------------------------
(Ò»)ÕûÊý·ûºÅµÄÏÝÚå
(¶þ)¸¡µãÊýµÄ±¾ÖÊ
(Èý)¶ÑÕ»µÄÄÚ´æ¹ÜÀí½á¹¹
(ËÄ)·ûºÅ½âÎö
(Îå)¶ÔÆëºÍ×ÜÏß´íÎó
(Áù)º¯ÊýÖ¸Õë
(Æß)Ð麯ÊýµÄÊ ......
µÚ2ÕÂ
»·¾³£º·Òë»·¾³: Ô´´úÂëת»¯³É¿ÉÖ´ÐеĻúÆ÷Ö¸Áî¡£
Ö´Ðл·¾³£ºÓÃÓÚʵ¼ÊÖ´ÐдúÂë¡£
·Ò룺ԴÎļþ-¡µÄ¿±êÎļþ-¡µ¿ÉÖ´ÐÐÎļþ£¨Í¨¹ýÁ´½ÓÆ÷½«¶à¸öÄ¿±êÎļþÀ¦°óÔÚÒ»Æð£©
±àÒë¹ý³Ì£ºÔ¤´¦ÀíÆ÷-¡µÔ´´úÂë¾¹ý½âÎö²úÉúÄ¿±ê´úÂ루Õâ¸ö¹ý³ÌÖÐÊǾø´ó¶àÊý´íÎóºÍ¾¯¸æ²úÉúµÄµØ·½£©-¡µÓÅ»¯Æ÷£¨¾ÍÊǶÔÄ¿±ê´úÂë½øÐнøÒ»²½ÓÅ»¯£¬Ê¹Ð§ÂÊ ......
yeah£¬×éºÏµÄÒ²³öÀ´ÁË£¬ÔÙÒ»Æð·¢Ò»¸ö
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
namespace ConsoleApplication32
{
class Program
{
static int s = 0;
static void Main(string[] args)
{
Console.Writ ......
»ØÒäC¹ÅÀϵÄmath.h¿â
¸ÅÊö£º
¡¡¡¡math.hÖÐΪÎÒÃÇÌṩÁËÈý½Çº¯ÊýÊýÖµÔËËã¡¢Ö¸Êý¶ÔÊýÔËËã¡¢¾ø¶ÔÖµ¡¢Æ½·½Öµ¡¢ÒÔ¼°Ò»Ð©»ù±¾µÄÊýÖµ´¦Àí¡£
º¯Êý£ºsin
¹¦ÄÜ£º¼ÆË㻡¶ÈµÄÕýÏÒÖµ¡£
ʹÓÃ˵Ã÷£ºsin(x)£¬xΪ´«ÈëµÄ»¡¶ÈÖµ¡£
º¯Êý£ºcos
¹¦ÄÜ£º¼ÆË㻡¶ÈµÄÓàÏÒÖµ¡£
ʹÓÃ˵Ã÷£ºcos(x)£¬xΪ´«ÈëµÄ»¡¶ÈÖµ¡£
º¯Êý£ºtan
¹¦ÄÜ£º¼ÆË㻡¶È ......
#include <list.h>
#include <dirent.h>
#include <iostream.h>
#include <sys/stat.h>
#include <sys/types.h>
/*****************************************************************
*º¯Êý¹¦ÄÜ: Ä¿_¼_±é_Àú.
*·µ»ØÖµ: ³É¹¦·µ»Ø0,ʧ°Ü·µ»Ø·Ç0.
*²ÎÊý path ......