C++?к??м???????
???????????? ???????[ 2014/3/12 9:49:01 ] ????????C++ ????
????modf
??????:
????#include <math.h>
????double modf( double num?? double *i );
????????? ??????????num ??????????С????????С????????????????????i??
????div
??????:
????#include <stdlib.h>
????div_t div( int numerator?? int denominator );
????????? ???????????numerator / denominator?????????????????div_t??????stdlib.h??:
????int quot; // ????
????int rem; // ????
???????? ???′??????x/y?????????:
????div_t temp;
????temp = div( x?? y );
????printf( "%d divided by %d yields %d with a remainder of %d
"?? x?? y?? temp.quot?? temp.rem );
????qsort
??????:
????#include <stdlib.h>
????void qsort( void *buf?? size_t num?? size_t size?? int (*compare)(const void *?? const void *) );
????????? ??buf ????????(????num ???????С?size)???п??????????????compare ??????????С????????????????????????????????????????????????????????buf ?????????????????
????bsearch
??????:
????#include <stdlib.h>
????void *bsearch( const void *key?? const void *buf?? size_t num?? size_t size?? int (*compare)(const void *?? const void *) );
????????? ???????????????????????buf[0]??buf[num-1] ??????key?????????compare ??????????С??????????????????????????????????????????????????????buf ?е??????????????С?????bsearch()?????????????????????з????????????NULL??
????atof
??????:
????#include <stdlib.h>
????double atof( const char *str );
????????:???????str?????????????????????????? ????str ????????Ч??????????????????“E”??“e”???????????????????β?????磺
????x = atof( "42.0is_the_answer" );
????x????42.0??
??????
???·???
??????????????????
2023/3/23 14:23:39???д?ò??????????
2023/3/22 16:17:39????????????????????Щ??
2022/6/14 16:14:27??????????????????????????
2021/10/18 15:37:44???????????????
2021/9/17 15:19:29???·???????·
2021/9/14 15:42:25?????????????
2021/5/28 17:25:47??????APP??????????
2021/5/8 17:01:11