C语言头文件,conio.h,windows.h,string.h,math.h各有什么用?

网上科普有关“C语言头文件,conio.h,windows.h,string.h,math.h各有什么用?”话题很是火热,小编也是针对C语言头文件,conio.h,window...

网上科普有关“C语言头文件,conio.h,windows.h,string.h,math.h各有什么用?”话题很是火热,小编也是针对C语言头文件,conio.h,windows.h,string.h,math.h各有什么用?寻找了一些与之相关的一些信息进行分析,如果能碰巧解决你现在面临的问题,希望能够帮助到您。

conio.h不是C标准库中的头文件。 conio是Console Input/Output(控制台输入输出)的简写,其中定义了通过控制台进行数据输入和数据输出的函数,主要是一些用户通过按键盘产生的对应操作,比如getch()函数等等。

[编辑本段]包含的函数

包含的函数: cgets(char *); cprintf(const char *, ...); cputs(const char *); cscanf(const char *, ...); inp(unsigned short); inpw(unsigned short); getch(void); getche(void); kbhit(void); outp(unsigned short, int); outpw(unsigned short, unsigned short); putch(int); ungetch(int); void _Cdecl clreol (void); void _Cdecl clrscr (void); void _Cdecl delline (void); int _Cdecl gettext (int left, int top, int right, int bottom, void *destin); void _Cdecl gettextinfo (struct text_info *r); void _Cdecl gotoxy (int x, int y); void _Cdecl highvideo (void); void _Cdecl insline (void); void _Cdecl lowvideo (void); int _Cdecl movetext (int left, int top, int right, int bottom, int destleft, int desttop); void _Cdecl normvideo (void); int _Cdecl puttext (int left, int top, int right, int bottom, void *source); void _Cdecl textattr (int newattr); void _Cdecl textbackground (int newcolor); void _Cdecl textcolor (int newcolor); void _Cdecl textmode (int newmode); int _Cdecl wherex (void); int _Cdecl wherey (void); void _Cdecl window (int left, int top, int right, int bottom); har *_Cdecl cgets (char *str); int _Cdecl cprintf (const char *format, ...); int _Cdecl cputs (const char *str); int _Cdecl cscanf (const char *format, ...); int _Cdecl getch (void); int _Cdecl getche (void); char *_Cdecl getpass (const char *prompt); int _Cdecl kbhit (void); int _Cdecl putch (int c); int _Cdecl ungetch (int ch);

windows.h

Windows程序的开头都可看到: #include <windows.h> WINDOWS.H是主要的头文件,它包含了其他Windows头文件,这些头文件的某些也包含了其他头文件。这些头文件中最重要的和最基本的是: WINDEF.H 基本型态定义。 WINNT.H 支援Unicode的型态定义。 WINBASE.H Kernel函数。 WINUSER.H 使用者介面函数。 WINGDI.H 图形装置介面函数。 这些头文件定义了Windows的所有资料型态、函数调用、资料结构和常数识别字,它们是Windows文件中的一个重要部分。

[编辑本段]文件内容

/*++ BUILD Version: 0001 Increment this if a change has global effects Copyright (c) Microsoft Corporation. All rights reserved. Module Name: windows.h Abstract: Master include file for Windows applications. --*/ #ifndef _WINDOWS_ #define _WINDOWS_ #ifdef __BORLANDC__ #pragma defineonoption __BOROPT_A -A #pragma defineonoption __BOROPT_H -H #if (__BORLANDC__ == 0x550) && defined(__BOROPT_A) && defined(__BOROPT_H) #error The use of both -A (ANSI mode) and -H (pre-compiled headers) at the same time is unsupported. #endif #endif /* __BORLANDC__ */ #pragma option push -b -a8 -pc -A- /*P_O_Push*/ #ifndef WINVER #define WINVER 0x0501 #else #if defined(_WIN32_WINNT) && (WINVER < 0x0400) && (_WIN32_WINNT > 0x0400) #error WINVER setting conflicts with _WIN32_WINNT setting #endif #endif #ifndef _INC_WINDOWS #define _INC_WINDOWS #if defined (_MSC_VER) && (_MSC_VER >= 1020) #pragma once #endif /* If defined, the following flags inhibit definition * of the indicated items. * * NOGDICAPMASKS - CC_*, LC_*, PC_*, CP_*, TC_*, RC_ * NOVIRTUALKEYCODES - VK_* * NOWINMESSAGES - WM_*, EM_*, LB_*, CB_* * NOWINSTYLES - WS_*, CS_*, ES_*, LBS_*, SBS_*, CBS_* * NOSYSMETRICS - SM_* * NOMENUS - MF_* * NOICONS - IDI_* * NOKEYSTATES - MK_* * NOSYSCOMMANDS - SC_* * NORASTEROPS - Binary and Tertiary raster ops * NOSHOWWINDOW - SW_* * OEMRESOURCE - OEM Resource values * NOATOM - Atom Manager routines * NOCLIPBOARD - Clipboard routines * NOCOLOR - Screen colors * NOCTLMGR - Control and Dialog routines * NODRAWTEXT - DrawText() and DT_* * NOGDI - All GDI defines and routines * NOKERNEL - All KERNEL defines and routines * NOUSER - All USER defines and routines * NONLS - All NLS defines and routines * NOMB - MB_* and MessageBox() * NOMEMMGR - GMEM_*, LMEM_*, GHND, LHND, associated routines * NOMETAFILE - typedef METAFILEPICT * NOMINMAX - Macros min(a,b) and max(a,b) * NOMSG - typedef MSG and associated routines * NOOPENFILE - OpenFile(), OemToAnsi, AnsiToOem, and OF_* * NOSCROLL - SB_* and scrolling routines * NOSERVICE - All Service Controller routines, SERVICE_ equates, etc. * NOSOUND - Sound driver routines * NOTEXTMETRIC - typedef TEXTMETRIC and associated routines * NOWH - SetWindowsHook and WH_* * NOWINOFFSETS - GWL_*, GCL_*, associated routines * NOCOMM - COMM driver routines * NOKANJI - Kanji support stuff. * NOHELP - Help engine interface. * NOPROFILER - Profiler interface. * NODEFERWINDOWPOS - DeferWindowPos routines * NOMCX - Modem Configuration Extensions */ #if defined(RC_INVOKED) && !defined(NOWINRES) #include <winresrc.h> #else #if defined(RC_INVOKED) /* Turn off a bunch of stuff to ensure that RC files compile OK. */ #define NOATOM #define NOGDI #define NOGDICAPMASKS #define NOMETAFILE #define NOMINMAX #define NOMSG #define NOOPENFILE #define NORASTEROPS #define NOSCROLL #define NOSOUND #define NOSYSMETRICS #define NOTEXTMETRIC #define NOWH #define NOCOMM #define NOKANJI #define NOCRYPT #define NOMCX #endif #if defined(__BORLANDC__) && defined(__cplusplus) # include <mem.h> // Needed for protos of memxxx() routines #endif #if defined(__BORLANDC__) # ifndef _WIN32_WINNT # define _WIN32_WINNT 0x0500 /* If not set, assume NT 5.00 */ # endif # if defined(__cplusplus) # define NOMINMAX /* for WINDEF.H */ # else # define NONAMELESSUNION /* for OAIDL.H, OBJIDL.H,... */ # endif # if defined(_UNICODE) # define UNICODE # endif #endif #if !defined(_68K_) && !defined(_MPPC_) && !defined(_X86_) && !defined(_IA64_) && !defined(_AMD64_) && defined(_M_IX86) #define _X86_ #endif #if !defined(_68K_) && !defined(_MPPC_) && !defined(_X86_) && !defined(_IA64_) && !defined(_AMD64_) && defined(_M_AMD64) #define _AMD64_ #endif #if !defined(_68K_) && !defined(_MPPC_) && !defined(_X86_) && !defined(_IA64_) && !defined(_AMD64_) && defined(_M_M68K) #define _68K_ #endif #if !defined(_68K_) && !defined(_MPPC_) && !defined(_X86_) && !defined(_IA64_) && !defined(_AMD64_) && defined(_M_MPPC) #define _MPPC_ #endif #if !defined(_68K_) && !defined(_MPPC_) && !defined(_X86_) && !defined(_M_IX86) && !defined(_AMD64_) && defined(_M_IA64) #if !defined(_IA64_) #define _IA64_ #endif // !_IA64_ #endif #ifndef _MAC #if defined(_68K_) || defined(_MPPC_) #define _MAC #endif #endif #if defined (_MSC_VER) #if ( _MSC_VER >= 800 ) #ifndef __cplusplus #pragma warning(disable:4116) // TYPE_ALIGNMENT generates this - move it // outside the warning push/pop scope. #endif #endif #endif #ifndef RC_INVOKED #if ( _MSC_VER >= 800 ) || defined(__BORLANDC__) #pragma warning(disable:4514) #ifndef __WINDOWS_DONT_DISABLE_PRAGMA_PACK_WARNING__ #pragma warning(disable:4103) #endif #if _MSC_VER >= 1200 #pragma warning(push) #endif #pragma warning(disable:4001) #pragma warning(disable:4201) #pragma warning(disable:4214) #endif #include <excpt.h> #include <stdarg.h> #endif /* RC_INVOKED */ #include <windef.h> #include <winbase.h> #include <wingdi.h> #include <winuser.h> #if !defined(_MAC) || defined(_WIN32NLS) #include <winnls.h> #endif #ifndef _MAC #include <wincon.h> #include <winver.h> #endif #if !defined(_MAC) || defined(_WIN32REG) #include <winreg.h> #endif #ifndef _MAC #include <winnetwk.h> #endif #ifndef WIN32_LEAN_AND_MEAN #include <cderr.h> #include <dde.h> #include <ddeml.h> #include <dlgs.h> #ifndef _MAC #include <lzexpand.h> #include <mmsystem.h> #include <nb30.h> #include <rpc.h> #endif #include <shellapi.h> #ifndef _MAC #include <winperf.h> #include <winsock.h> #endif #ifndef NOCRYPT #include <wincrypt.h> #include <winefs.h> #include <winscard.h> #endif #ifndef NOGDI #ifndef _MAC #include <winspool.h> #ifdef INC_OLE1 #include <ole.h> #else #include <ole2.h> #endif /* !INC_OLE1 */ #endif /* !MAC */ #include <commdlg.h> #endif /* !NOGDI */ #endif /* WIN32_LEAN_AND_MEAN */ #include <stralign.h> #ifdef _MAC #include <winwlm.h> #endif #ifdef INC_OLE2 #include <ole2.h> #endif /* INC_OLE2 */ #ifndef _MAC #ifndef NOSERVICE #include <winsvc.h> #endif #if(WINVER >= 0x0400) #ifndef NOMCX #include <mcx.h> #endif /* NOMCX */ #ifndef NOIME #include <imm.h> #endif #endif /* WINVER >= 0x0400 */ #endif #ifndef RC_INVOKED #if ( _MSC_VER >= 800 ) || defined(__BORLANDC__) #if _MSC_VER >= 1200 #pragma warning(pop) #else #pragma warning(default:4001) #pragma warning(default:4201) #pragma warning(default:4214) /* Leave 4514 disabled. It's an unneeded warning anyway. */ #endif #endif #endif /* RC_INVOKED */ #endif /* RC_INVOKED */ #endif /* _INC_WINDOWS */ #pragma option pop /*P_O_Pop*/ #endif /* _WINDOWS_ */

string.h

C语言里面关于字符数组的函数定义的头文件,常用函数有strlen、strcmp、strcpy等等,更详细的可以到include文件夹里面查看该文件。 下面更详细的介绍下: /***********************************************************************/ C、传统 C++ #include <assert.h> //设定插入点 #include <ctype.h> //字符处理 #include <errno.h> //定义错误码 #include <float.h> //浮点数处理 #include <fstream.h> //文件输入/输出 #include <iomanip.h> //参数化输入/输出 #include <iostream.h> //数据流输入/输出 #include <limits.h> //定义各种数据类型最值常量 #include <locale.h> //定义本地化函数 #include <math.h> //定义数学函数 #include <stdio.h> //定义输入/输出函数 #include <stdlib.h> //定义杂项函数及内存分配函数 #include <string.h> //字符串处理 #include <strstrea.h> //基于数组的输入/输出 #include <time.h> //定义关于时间的函数 #include <wchar.h> //宽字符处理及输入/输出 #include <wctype.h> //宽字符分类 /***********************************************************************/ 标准 C++ (同上的不再注释) #include <algorithm> //STL 通用算法 #include <bitset> //STL 位集容器 #include <cctype> #include <cerrno> #include <clocale> #include <cmath> #include <complex> //复数类 #include <cstdio> #include <cstdlib> #include <cstring> #include <ctime> #include <deque> //STL 双端队列容器 #include <exception> //异常处理类 #include <fstream> #include <functional> //STL 定义运算函数(代替运算符) #include <limits> #include <list> //STL 线性列表容器 #include <map> //STL 映射容器 #include <iomanip> #include <ios> //基本输入/输出支持 #include <iosfwd> //输入/输出系统使用的前置声明 #include <iostream> #include <istream> //基本输入流 #include <ostream> //基本输出流 #include <queue> //STL 队列容器 #include <set> //STL 集合容器 #include <sstream> //基于字符串的流 #include <stack> //STL 堆栈容器 #include <stdexcept> //标准异常类 #include <streambuf> //底层输入/输出支持 #include <string> //字符串类 #include <utility> //STL 通用模板类 #include <vector> //STL 动态数组容器 #include <cwchar> #include <cwctype> using namespace std; /***********************************************************************/ C99 增加 #include <complex.h> //复数处理 #include <fenv.h> //浮点环境 #include <inttypes.h> //整数格式转换 #include <stdbool.h> //布尔环境 #include <stdint.h> //整型环境 #include <tgmath.h> //通用类型数学宏 /***********************************************************************/

math.h

数学函数库,一些数学计算的公式的具体实现是放在math.h里,具体有: 1 三角函数 double sin (double); double cos (double); double tan (double); 2 反三角函数 double asin (double); 结果介于[-PI/2, PI/2] double acos (double); 结果介于[0, PI] double atan (double); 反正切(主值), 结果介于[-PI/2, PI/2] double atan2 (double, double); 反正切(整圆值), 结果介于[-PI/2, PI/2] 3 双曲三角函数 double sinh (double); double cosh (double); double tanh (double); 4 指数与对数 double exp (double); double sqrt (double); double log (double); 以e为底的对数 double log10 (double); double pow(double x, double y)//计算以x为底数的y次幂 5 取整 double ceil (double); 取上整 double floor (double); 取下整 6 绝对值 double fabs (double); double cabs(struct complex znum) //求复数的绝对值 7 标准化浮点数 double frexp (double f, int *p); 标准化浮点数, f = x * 2^p, 已知f求x, p ( x介于[0.5, 1] ) double ldexp (double x, int p); 与frexp相反, 已知x, p求f 8 取整与取余 double modf (double, double*); 将参数的整数部分通过指针回传, 返回小数部分 double fmod (double, double); 返回两参数相除的余数 9其他 double hypot(double x, double y);//已知直角三角形两个直角边长度,求斜边长度 double ldexp(double x, int exponent);//计算x*(2的exponent次幂) double poly(double x, int degree, double coeffs [] )//计算多项式 nt matherr(struct exception *e)//数学错误计算处理程序 source: 《C & C++ Code Capsules》

关于“C语言头文件,conio.h,windows.h,string.h,math.h各有什么用?”这个话题的介绍,今天小编就给大家分享完了,如果对你有所帮助请保持对本站的关注!

本文来自作者[翠菡]投稿,不代表小熊号立场,如若转载,请注明出处:https://www.xx-scm.com/cshi/202607-179595.html

(218)

文章推荐

  • 必看教程“微乐麻将有挂么神器(其实真的能开挂)

    必看教程“微乐麻将有挂么神器网上科普有关“必看教程“微乐麻将有挂么神器”话题很是火热,小编也是针对必看教程“微乐麻将有挂么神器寻找了一些与之相关的一些信息进行分析,如果能碰巧解决你现在面临的问题,希望能够帮助到您。  您好,必看教程“微乐麻将有挂么神器这款游戏可以开挂的,确实是有挂的

    2025年03月15日
    73
  • yy比鸡有挂没有”(其实是有挂)

    yy比鸡有挂没有网上科普有关“yy比鸡有挂没有”话题很是火热,小编也是针对yy比鸡有挂没有寻找了一些与之相关的一些信息进行分析,如果能碰巧解决你现在面临的问题,希望能够帮助到您。  您好,yy比鸡有挂没有这款游戏可以开挂的,确实是有挂的,通过微信【】很多玩家在这款游戏中打牌都会发现很

    2025年05月19日
    57
  • 实测辅助”云韵够鼎棋牌到底有没有挂(详细真的有挂)

    云韵够鼎棋牌到底有没有挂网上科普有关“云韵够鼎棋牌到底有没有挂”话题很是火热,小编也是针对云韵够鼎棋牌到底有没有挂寻找了一些与之相关的一些信息进行分析,如果能碰巧解决你现在面临的问题,希望能够帮助到您。  您好,云韵够鼎棋牌到底有没有挂这款游戏可以开挂的,确实是有挂的,通过微信【】很

    2025年05月20日
    71
  • 6秒懂!微乐安徽麻将怎么开挂”果然有挂

    网上科普有关“微乐安徽麻将怎么开挂”话题很是火热,小编也是针对同城衡阳字牌作弊开挂的方法寻找了一些与之相关的一些信息进行分析,如果能碰巧解决你现在面临的问题,希望能够帮助到您。  您好,微乐安徽麻将怎么开挂这款游戏可以开挂的,确实是有挂的,通过微信【游戏】很多玩家在这款游戏中打牌都会发现

    2025年06月10日
    40
  • 辅助开挂工具“手机麻将怎样容易赢(详细真的有挂)

    网上科普有关“手机麻将怎样容易赢”话题很是火热,小编也是针对同城衡阳字牌作弊开挂的方法寻找了一些与之相关的一些信息进行分析,如果能碰巧解决你现在面临的问题,希望能够帮助到您。  您好,手机麻将怎样容易赢这款游戏可以开挂的,确实是有挂的,通过微信【游戏】很多玩家在这款游戏中打牌都会发现很多

    2025年07月03日
    37
  • 辅助教程实测“友乐广西麻将开挂下什么软件(万能开挂器通用版)

    网上科普有关“友乐广西麻将开挂下什么软件”话题很是火热,小编也是针对同城衡阳字牌作弊开挂的方法寻找了一些与之相关的一些信息进行分析,如果能碰巧解决你现在面临的问题,希望能够帮助到您。  您好,友乐广西麻将开挂下什么软件这款游戏可以开挂的,确实是有挂的,通过微信【游戏】很多玩家在这款游戏中

    2025年07月13日
    34
  • 辅助教程实测“逍遥麻将开挂方法”实测确实有挂

    网上科普有关“逍遥麻将开挂方法”话题很是火热,小编也是针对同城衡阳字牌作弊开挂的方法寻找了一些与之相关的一些信息进行分析,如果能碰巧解决你现在面临的问题,希望能够帮助到您。  您好,逍遥麻将开挂方法这款游戏可以开挂的,确实是有挂的,通过微信【游戏】很多玩家在这款游戏中打牌都会发现很多用户

    2025年07月20日
    32
  • 实测分析“四川麻将换三张开挂教程(开挂神器怎么用)

    网上科普有关“四川麻将换三张开挂教程”话题很是火热,小编也是针对同城衡阳字牌作弊开挂的方法寻找了一些与之相关的一些信息进行分析,如果能碰巧解决你现在面临的问题,希望能够帮助到您。  您好,四川麻将换三张开挂教程这款游戏可以开挂的,确实是有挂的,通过微信【游戏】很多玩家在这款游戏中打牌都会

    2025年08月19日
    23
  • 玩家必搜“微信链接牛牛有开挂软件吗”确实真的有挂

    微信链接牛牛有开挂软件吗网上科普有关“微信链接牛牛有开挂软件吗”话题很是火热,小编也是针对微信链接牛牛有开挂软件吗寻找了一些与之相关的一些信息进行分析,如果能碰巧解决你现在面临的问题,希望能够帮助到您。  您好,微信链接牛牛有开挂软件吗这款游戏可以开挂的,确实是有挂的,通过微信【】很

    2025年08月26日
    23
  • 疫情期间钟南山做的事情(疫情期间钟南山做了哪些工作)

    钟南山抗击疫情做了什么贡献?1、中国钟南山的贡献主要包括以下几点:抗击新冠疫情:亲临前线:在武汉疫情爆发初期,钟南山院士亲自前往疫情前线,带领团队开展医疗救治工作,极大地鼓舞了士气,稳定了民心。科学指导:在火车上熬夜思考疫情应对方法,为疫情防控提供了宝贵的科学建议和指导。2、钟南山在抗击疫情中做出

    2025年09月23日
    27

发表回复

本站作者后才能评论

评论列表(4条)

  • 翠菡
    翠菡 2026年07月22日

    我是小熊号的签约作者“翠菡”!

  • 翠菡
    翠菡 2026年07月22日

    希望本篇文章《C语言头文件,conio.h,windows.h,string.h,math.h各有什么用?》能对你有所帮助!

  • 翠菡
    翠菡 2026年07月22日

    本站[小熊号]内容主要涵盖:国足,欧洲杯,世界杯,篮球,欧冠,亚冠,英超,足球,综合体育

  • 翠菡
    翠菡 2026年07月22日

    本文概览:网上科普有关“C语言头文件,conio.h,windows.h,string.h,math.h各有什么用?”话题很是火热,小编也是针对C语言头文件,conio.h,window...