List All Include With Explanations In C

One of the most common mistakes programmers consider creating bicycles, wheels, etc. It is incredibly difficult to disagree with this, because in practice it is, but how to deal with it? Many programmers will tell you with one voice: learn STL - a standard library that contains the achievements of many developers of the programming language, and can also help in the development of a new program. In this article, we will examine in detail what C #Include is, how it works and what it was created for. The article is recommended not only to novice users of the Windows operating system, but also to first-second year programmers.

What it is?

To begin with, it is worth enlightening those who are faced with programming for the first time and do not know, especially about the subtleties of program assembly. Initially, people programmed in machine languages, after scientific and technological progress in the field of microprocessors, it was decided to create an operating system for large masses of users.

The idea was good, but very difficult to implement, since it would take decades if machine codes were used to build programs. Then another task was entrusted: to create a programming language in which it would be easy to create an operating system, S. became that language.

si logo

Yes, many will say that there is no object-oriented programming, as in C ++. This is true, but you can write an OS on functions as well, which is proved by Linux and the Windows kernel. In this programming language, each library is connected at the beginning of the file, all thanks to the C #include preprocessor label. After the keyword with a trellis there should be a file name as follows: <so if the file is in the folder with the compiler> and โ€œso if it is outside the compiler folderโ€. Example of the correct connection: #include <cmath.h>

During processing, the compiler goes through each such label, adds the necessary files, and then passes it all to the linker and interpreter included in the compiler set. Many functions from C work quite well in C ++, but not in the reverse order - you should definitely know this.

Visual C Libraries Include

So. Weโ€™ve already figured out what Include is, now we can work with it, but you still donโ€™t know anything about the IDE, the integrated development environment. The development environment is essentially a smart notebook, if you cut it too much. You write your code, after which you want to compile it. If you were working on Linux, you would have to do compilation through the command line, manually connecting or through the make-file all non-standard libraries, but in the IDE this is all done automatically.

simple program and standard libraries

There is also full control over the application so that it does not accidentally break the system. You can look at the resources spent, and, most importantly - the errors are explained as detailed as possible, and with an indication of the line.

One of the best IDEs is rightly considered Microsoft Visual Studio. Moreover, in this development environment, the language itself has even slightly changed, so in this section we will analyze the most popular standard Visual C libraries.

List of libraries:

  1. Time.h - header file for working with time intervals.
  2. Stdlib.h - header file with the standard library class connected.
  3. Stdio.h - standard input / output library.
  4. Fsteam.h - a library for working with files.

There are also other, much more specific libraries, but their study is recommended only when you need to work only with the capabilities of Visual Studio. By the way, there are several variations of this IDE, on which sets of standard libraries depend, for example, in the PRO version there are tools for working with Android, but in the usual one there isnโ€™t.

List of all Include with explanations in C

Do you know what classes are? If not, then you have questions why libraries end with โ€œ.hโ€. To be brief, classes are a certain kind of Lego blocks that can be inserted into a program. To make it easy - they exist. According to the rule of good form of programming, the declarations of their parameters must be filled in the header file, and the execution itself in a separate extension "*. with "or" *. cpp ".

lines of code

Before starting the explanation, you need to understand the C library: Include <windows.h> - this library was created specifically for the Windows operating system, inside it there are all the necessary functions and classes for working not only with the graphical component of the system, but also with parameters that are accurate settings, command line and much more. If you want to write programs for Windows, then it should be the first on the list of study.

STL List:

  1. Vector.h - work with dynamic memory called vectors.
  2. Map.h - special dictionaries.
  3. Iostream - a library for working with input and output to the console.
  4. Fout - work with files. The analogue is C Include <file>.
  5. Stdlib - is a class derived from other STLs.
  6. Errno.h - header file for displaying errors in the console.
  7. Ctype.h - header file for working with askey code.

The standard library is an incredible collection of various creations of the creator of the language, as well as many other programmers. The use of STL is encouraged at any level. There are also many other less well-known libraries, for example, C Include <Signal.h> is a library for working with system signals, but their study is required in highly specialized programs.

In c ++

As already mentioned: C ++ took all the best from the C language. The main compiler is, although it is considered one of the slowest, since it has to go around every file, every line to search for special labels, then give everything to the linker, but for now everything will be connected, a lot of time will pass, so large projects are collected up to an hour and a half.

C language

A plus is the high speed of the received program, i.e. its speed, so this language is used almost everywhere, wherever possible, even in household appliances there is a mandatory line of C ++ code.

What happens if there is no STL on the computer?

In C and C ++, there is dynamic and static compilation. Depending on the system under which the product is manufactured, appropriate libraries are also embedded. For example, the Windows.h library is not on Linux, and on Windows there is no x11.lib (the libraries have such an extension - * .lib). This fact must be taken into account, but thanks to smart IDEs, you can choose between dynamic and static assembly. In the case of a dynamic one, specific libraries from the system, while in a static one, the project takes more, but it is guaranteed to run on a specific system.

bit operations

Finally

We hope you enjoyed plunging into such an amazing and colorful world of programming. If you have never written your own program, we recommend that you start doing it right now, because the taste of victory over the machine is too pleasant. We also hope that the study with Include was given to you without any special complications. In any case, you can visit MDSN and find out more.

Source: https://habr.com/ru/post/K19720/


All Articles