Joke Collection Website - Public benefit messages - What is api and how to call it in a program?
What is api and how to call it in a program?
API is a predefined interface for programmers to call. Is a set of predefined functions used to control various components of the system. The operation mode is as follows:
1. Before C++ calls the system API, you need to declare the corresponding header file. The system function MessageBoxA is used here, corresponding to the header file:? ”windows.h“。
2. Using angle brackets, the compiler will search the header file in the include directory first; If it is not found, it will be searched in the directory where the source code is located. 2, using double quotation marks is the opposite, will search in the source code directory first; Usually used to contain the header files written by the program author himself.
3. As you can see in the figure in the third part, the MessageBoxA function contains four parameters. There are parameters in the parentheses of the function, and each parameter is separated by an English comma. When the mouse points at the function, the function description information will appear.
4. NULL in the parameter is a constant of , which means no setting or default setting. You can also write directly without using constants.
5. the MessageBoxA function runs as shown in the figure.
- Related articles
- Baotou issued early warning of plague epidemic. Is it really difficult to prevent and control plague in pastoral areas?
- How to check Inner Mongolia life insurance in Inner Mongolia Human Resources and Social Security Bureau
- Mid-Autumn Festival SMS greetings
- Unable to receive the verification code of Hubei accountant information management system.
- How does Huawei p40 download ringtones?
- Summary of safety construction work
- I haven't received the verification code of Ali trumpet recently. Do you have the same as me?
- Why do you have this information in your mobile phone after donating blood?
- What is the memorandum book for discounting bills receivable?
- Apple im sends text messages to make money