ÃÔ¹¬¿ÎÉè ¾ø¶ÔÔ´´ 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)
{
Ïà¹ØÎĵµ£º
0x80000000£¬¼´–2147483648ʱ,¶ÔËüÈ¡¸º»á²úÉúÉÏÒç
VC.NET 7.1 ÌṩµÄÈ¡¾ø¶ÔÖµº¯Êý(abs.cÖÐ)ÈçÏ£º
¡¡¡¡ int __cdecl abs ( int number)
¡¡¡¡ {
¡¡¡¡ return( number>=0 ? number : -number );
¡¡¡¡ }
¡¡¡¡ ´Ëº¯ÊýʵÏֵ÷dz£¼òµ¥£¬Õ§¿´Ö®ÏÂÎÞÈκÎ벡£¬¿ÉÊÇ×Ðϸ×ÁÄ¥×ÁÄ¥ ......
¾«¶Ì¸ßЧµÄXML½âÎöÆ÷,´¿Cµ¥Ò»³ÌÐò,Ó¦ÓÃÓÚÒøÐеĹúË°¿âÐкáÏòÁªÍø½Ó¿ÚϵͳÖÐ,Îȶ¨¿É¿¿,ÔËÐÐËٶȷɿì,·ÇÏàÓ¦µÄJAVA³ÌÐò¿É±È.ÒÔÏÂΪ´ó²¿·ÖÔ´Âë:
/* Copyright (c) 2005 wzs */
#include <stdlib.h>
#include <stdio.h>
#include <string.h>
#include <time.h>
#include <varargs.h>
#i ......
ÔÚWindows 2000/XPÖУ¬"Documents and Settings"ÊÇÒ»¸öÌØÊâÎļþ¼Ð¡£Óû§ÅäÖÃÎļþ¡¢×ÀÃæ¡£ÉõÖÁÁ¬ÃÜÔ¿ÐÅÏ¢¶¼±£´æÔÚÕâÀïÃæ¡£Èç¹ûÓ²Å̿ռ䲻¹»£¬Ïë°ÑËüÃÇ»»¸öµØ·½¡£µ«ÕâЩ¶«Î÷È´ºÜÄÑÒƶ¯¡£ÎÒÃǵÄÎÊÌâÊÇ£ºÈçºÎÔÚ±£Ö¤ÏµÍ³Õý³£ÔËÐеÄÇé¿öÏ£¬½«"Documents and Settings"Îļþ¼ÐÒƶ¯µ½ÁíÍâÒ»¸ö·ÖÇø?
......
»ØÒäC¹ÅÀϵÄmath.h¿â
¸ÅÊö£º
¡¡¡¡math.hÖÐΪÎÒÃÇÌṩÁËÈý½Çº¯ÊýÊýÖµÔËËã¡¢Ö¸Êý¶ÔÊýÔËËã¡¢¾ø¶ÔÖµ¡¢Æ½·½Öµ¡¢ÒÔ¼°Ò»Ð©»ù±¾µÄÊýÖµ´¦Àí¡£
º¯Êý£ºsin
¹¦ÄÜ£º¼ÆË㻡¶ÈµÄÕýÏÒÖµ¡£
ʹÓÃ˵Ã÷£ºsin(x)£¬xΪ´«ÈëµÄ»¡¶ÈÖµ¡£
º¯Êý£ºcos
¹¦ÄÜ£º¼ÆË㻡¶ÈµÄÓàÏÒÖµ¡£
ʹÓÃ˵Ã÷£ºcos(x)£¬xΪ´«ÈëµÄ»¡¶ÈÖµ¡£
º¯Êý£ºtan
¹¦ÄÜ£º¼ÆË㻡¶È ......
ż¶û¿´µ½ C Primer Plus Öн²µ½±ä³¤Êý×é(VLA)£¬ºÜÓÐÒâ˼¡£
×÷ÕßÔÚËûµÄ C Primer Plus ºÍ C++ Primer Plus ÀïÃ涼Ã÷È·Ö¸³ö£¬¶¨ÒåÊý×éʱÊý×éµÄÔªËظöÊý±ØÐëÊÇÕûÐͳ£Á¿£¬²»ÄÜÊDZäÁ¿¡£µ«ÊÇÔÚ C Õâ±¾ÊéÀï½²µ½±ä³¤Êý×é VLA£¬ÔÚ C++ ÄDZ¾ÀïÃæÓÖûÓÐÌá¡£²»ÖªµÀΪʲô£¿ÏëÀ´Ò»¶¨ÊÇ VLA ÓÃÆðÀ´ÓÐЩ²»Ì«Ã÷È·µÄµØ·½¡£
ÎÒÊÔ×ÅдÁ˸öС³ ......