±àдC/C++Í·Îļþ
Í·ÎļþÒ»°ãÓÉÈý²¿·ÖÄÚÈÝ×é³É£º(1)Í·Îļþ¿ªÍ·´¦µÄ°æȨºÍ°æ±¾ÉùÃ÷£»(2)Ô¤´¦Àí¿é£»(3)º¯ÊýºÍÀà½á¹¹ÉùÃ÷µÈ¡£
Í·ÎļþÀ©Õ¹ÃûΪ*.h¡£
Ϊ±ÜÃâ³öÏÖÖظ´¶¨ÒåµÄÎÊÌâ £¬Í·ÎļþÒ»°ãд·¨ÈçÏ£º
/*----------------------------------------------------
MATH.H
-------------------------------------------------------*/
#ifndef _MATH_H_ //·ÀÖ¹MATH.h±»Öظ´ÒýÓÃ
#define _MATH_H_
//´úÂ벿·Ö
#endif
Àý±ê×¼math.hд·¨ÈçÏÂ:
/*--------------------------------------------------------------------------
MATH.H
Prototypes for mathematic functions.
Copyright (c) 1988-2002 Keil Elektronik GmbH and Keil Software, Inc.
All rights reserved.
--------------------------------------------------------------------------*/
#ifndef __MATH_H__ //·ÀÖ¹MATH.h±»Öظ´ÒýÓÃ
#define __MATH_H__
#pragma SAVE
#pragma REGPARMS
extern char cabs (char val); //º¯ÊýÉêÃ÷²¿·Ö
extern int abs (int val);
extern long labs (long val);
extern float fabs (float val);
extern float sqrt (float val);
extern float exp (float val);
extern float log (float val);
extern float log10 (float val);
extern float sin (float val);
extern float cos (float val);
extern float tan (float val);
extern float asin (float val);
extern float acos (float val);
extern float atan (float val);
extern float sinh (float val);
extern float cosh (float val);
extern float tanh (float val);
extern float atan2 (float y, float x);
extern float ceil (float val);
exter
Ïà¹ØÎĵµ£º
ϵͳ»·¾³£ºWindows 7
Èí¼þ»·¾³£ºVisual C++ 2008 SP1 +SQL Server 2005
±¾´ÎÄ¿µÄ£º±àдһ¸öº½¿Õ¹ÜÀíϵͳ
ÕâÊÇÊý¾Ý¿â¿Î³ÌÉè¼ÆµÄ³É¹û£¬ËäÈ»³É¼¨²»¼Ñ£¬µ«ÊÇ×÷ΪÎÒÓÃVC++ ÒÔÀ´±àдµÄ×î´ó³ÌÐò»¹ÊÇ´«µ½ÍøÉÏ£¬ÒÔ¹©²Î¿¼¡£ÓÃVC++ ×öÊý¾Ý¿âÉè¼Æ²¢²»ÈÝÒ×£¬µ«Ò²²»ÊDz»¿ÉÄÜ¡£ÒÔÏÂÊÇÎҵijÌÐò½çÃ棬ºóÃæ ......
̸̸CÓïÑÔµÄmalloc()ºÍfree()
Ò»¡¢malloc()ºÍfree()µÄ»ù±¾¸ÅÄîÒÔ¼°»ù±¾Ó÷¨£º
1¡¢º¯ÊýÔÐͼ°ËµÃ÷£º
void *malloc(long NumBytes)£º¸Ãº¯Êý·ÖÅäÁËNumBytes¸ö×Ö½Ú£¬²¢·µ»ØÁËÖ¸ÏòÕâ¿éÄÚ´æµÄÖ¸Õë¡£Èç¹û·ÖÅäʧ°Ü£¬Ôò·µ»ØÒ»¸ö¿ÕÖ¸Õ루NULL£©¡£
¹ØÓÚ·ÖÅäʧ°ÜµÄÔÒò£¬Ó¦¸ÃÓжàÖÖ£¬±ÈÈç˵¿Õ¼ä²»×ã¾ÍÊÇÒ»ÖÖ¡£
void free(void *Fir ......
ÉÏ´Î×ܽáÁËC++£¨ÃæÏò¶ÔÏó£©Éè¼ÆµÄºËÐÄ˼Ï룬²¢ÇÒÀý¾ÙÁËʹÓÃÀàÄ£ÐÍÀ´Ìæ´úifºÍswitchµÄÒ»ÖÖ½ÏΪµäÐ͵ÄÇé¿ö¡£ÏÂÃæÏëÀ´Ì¸Ì¸C++ÔÚ±àÂë·½ÃæµÄÌص㡣
ÔںܶྵäµÄC++½Ì³ÌÖж¼ÓÐÒ»¸ö½¨Ò飺Ӧ¾¡Á¿Ê¹Óû§´úÂ루¿âµÄʹÓÃÕߣ©¿´ÆðÀ´¶ÌС¶ø¼òµ¥¡£°´ÕÕ³£Ê¶£¬¼òµ¥µÄ´úÂëͨ³£Òª±È´ó¶ÎµÄ´úÂëºÃÀí½â£¬¶øÓû§´úÂëͨ³£ÊµÏÖµÄÊÇ×îÉϲãµÄ¹¦ÄÜ»òÕ ......
0x80000000£¬¼´–2147483648ʱ,¶ÔËüÈ¡¸º»á²úÉúÉÏÒç
VC.NET 7.1 ÌṩµÄÈ¡¾ø¶ÔÖµº¯Êý(abs.cÖÐ)ÈçÏ£º
¡¡¡¡ int __cdecl abs ( int number)
¡¡¡¡ {
¡¡¡¡ return( number>=0 ? number : -number );
¡¡¡¡ }
¡¡¡¡ ´Ëº¯ÊýʵÏֵ÷dz£¼òµ¥£¬Õ§¿´Ö®ÏÂÎÞÈκÎ벡£¬¿ÉÊÇ×Ðϸ×ÁÄ¥×ÁÄ¥ ......