What is the difference between C ++ and C Programming in Linux and Windows?
[Tag: C ++ programming, C ++, and Linux] Let's talk about the differences between C function libraries.
C ++ is no difference?
Function library differences Linux C function library and WINDOWS function library system call mechanism is different glibc contains the main C library.
This library provides basic routines for allocating memory, searching directories, opening and closing files, reading and writing files, string processing, and pattern matching.
And Mathematical computing. The Mechanism is different not only in terms of the interrupt number, but also in terms of the input parameter and Output
The data address and output address are located in the register. The implementation of those functions in Windows and Linux should be different.
In general, how can ext3 and FAT32 be the same? There are also mm memory management, which are different. The interruption still belongs to the hardware layer.
It should be similar, but the implementation of the operating system layer is quite different. Other differences: 1. Different System Platforms
Underlying development involves the system kernel. For Linux, you can know what structure it contains,
Windows... 2. The compiler environment is different. in Linux, the GCC compiler is used,
GDB debugging tools and a variety of visual editors such as Emacs and kedit, as well as text VI/vim.
Strong, I personally think it is better than win. Although Win's mingw and devcpp integrate with GCC, it is always helpful.
Unhappy ~, GCC provides excellent support for the standard. For different audiences, win is mainly for vendors.
Industry-based development, while the vast majority of programmers prefer programming in their own open and free systems, and do not want to ban programming in windows.
Surrounded by 4 (MS. The development direction is different. The idea of opensource has blossomed in the pure land of Linux.
See GPL ..... Easy to find information, open source code, can experience the fun of Development Win, Ms gradually put a batch of developers
Members are bound in their own systems, and the development environment is getting dumb. Can this be humanized? To the end... The more likely it is to go
Far ~ 5. Copyright issues win many things involve copyright issues, although Linux free software is open
Software, but many of them are for commercial use for free... Of course, some need to develop source code, so many do not need ~ Differences between C ++
Or similar
Linux is an operating system like windows, but the usage and habits of the two are different. The specific difference is actually very big, but it is not something that can be clearly stated here.
For C programming, the biggest difference is that the features related to your system are different. This leads to the so-called portability and platform features. A metaphor for the image is that you can think that Linux and Windows are both human beings. They all know part of English, but one is a Chinese language and the other is German. If they know everything you use in English, they will be able to help you do things well. If they do not understand the English you speak, they can only speak to them in their mother tongue. The result is that Linux, which you speak German, does not understand. windows, which you speak Chinese, does not understand. Therefore, for simple programming, there is no big difference between them. If it is complicated... you are going to translate one party's mother tongue into the other's mother tongue.
For copyright reasons, the source code of the library function is generally invisible, but you can see its external interface in the header file.
Library functions are programs written by others and you use them in your programs.
First, the standard only specifies the interfaces of these functions and the specific operational efficiency requirements. How to write these functions depends on the implementation and platform of each compiler.
If you are using Visual Studio, Microsoft provides the source code of some C Runtime (CRT) functions including memcpy and strcpy, in Visual Studio 2005, the path is c: \ Program Files \ Microsoft Visual Studio 8 \ Vc \ CRT \ SRC. For more information, see.
What are the differences between C-language mathematical library functions and standard library functions?
The C language standards have changed several times. Currently, the C language standards refer to the c99 standards set in 99 years. The defined function library is the c Standard function library. For more information, see the C Language Reference Manual (C: A Reference Manual, th Edition).
But in fact, each C/C ++ compiler has its own function library, which is generally compatible with the C standard function library, but there are some details of the discrepancy. Therefore, you only need to evaluate the function library of your Compiler (usually from the help ).
Mathematical functions are a type of standard library functions.
Standard library functions are used first, and platform-independent functions can be implemented.
Application Interface API functions are platform-related
A compiler function is a class library function such as MFC or VCL. After being packaged into a program, a function library must be included.
Standard library functions are determined by the standards of a language.
API functions are provided by the operating system.
Most of the time, standard library functions need to be implemented by Calling API functions.
But when I use it myself, I think it is best to call the standard library function.
This is much more portable.
Standard library functions are naturally prioritized. The standard library can be implemented and platform-independent.
If system programming is used, APIs are used, but the general ide encapsulates APIs, such as MFC, so it is more convenient to use MFC.
Of course, it is convenient to use APIs to solve some problems.
Compiler functions? If it refers to MFC, it is what I mentioned above,
Otherwise, if you use C ++, the general compiler will implement the standard library. Just use the standard library directly.
There are also some other popular libraries,
C ++ quasi-standard library boost, refer to www.boost.org
Qt in Linux is a GUI library, similar to MFC in windows, but implemented using the standard C ++.
Standard library function: A program specification that provides a set of standard functions. There may be several specifications, such as c99 and Standard C.
Compiler function: Used to tell the compiler how to compile your program, such as # define, # typedef
API functions: Provided by the operating system to support operations on the platform, such
The standard library is a standard and standard that can be very convenient across platforms
Compiler functions are generally provided by the Compiler class library.
APIs are generally provided by the operating system.
Both have some limitations.