In terms of development time, we should first have C, then C ++, and then C #.
In terms of structure, C is a process-oriented programming language, and C # And C ++ are object-oriented programming languages.
C ++ is a C upgrade. C # is a bit like the combination of C ++ and java, and more like java.
In C ++, the C syntax is all true, but the class concept is added.
C # is a programming language developed by Microsoft Based on the advantages of JAVA Network on the basis of C ++.
C ++ is relatively difficult at the bottom layer, but it can develop almost all the functions you want, but the efficiency is just the end.
C # is launched by Microsoft. It is a network-oriented programming language. Its syntax structure is similar to that of C ++. It is much simpler than C ++ and can meet most of today's social needs, and the development efficiency is very high.
-----------------------------
The inheritance relationship is C-> C ++-> C #. C ++ is fully compatible with C. C programs can be run on the C ++ compiler without any modifications. C ++, also known as C with classes, adds many object-oriented concepts on the basis of C. although it is a C extension, it does not mean that C functions are not as good as C ++. The best operating system is written in C (not C ++ ).
C # Is something Microsoft developed. It inherits many things of C and C ++, but it is basically different from the two. you can learn it as a brand new language.
C language is a structured programming language. It has a clear hierarchy, which facilitates the organization of programs in a modular manner and facilitates debugging and maintenance.
The C language has strong performance and processing capabilities. It not only has rich operators and data types, but also facilitates various complex data structures. It can also directly access the physical address of the memory for bit-level operations.
Since C language implements hardware programming, C language integrates the functions of advanced and low-level languages. It can be used for system software development and application software development.
In addition, C language features high efficiency and portability. Therefore, it is widely transplanted to various types of computers, thus forming multiple versions of C language.
C ++ is a programming language improved on the basis of C. It mainly adds many new functions and is more difficult than C. Like C, C ++ focuses on the underlying operations of computers, that is, the development of system software.
C # is the improved programming language based on C ++, which is less difficult than C ++ (Microsoft said so) and focuses on network and database programming. These three are programming languages, and the syntax is basically the same, but the specific content difference is quite large.
VC ++ is a programming software, which is equivalent to a exercise book. After you have learned the C ++ language, you need to write this programming language in a exercise book, that is, it is written in the VC programming software to achieve the desired effect.
C ++ is an upgraded version of c, c is a subset of c ++, c is process-oriented, and C ++ Is Object-Oriented.
There are many differences between C and C ++:
1. The new procedural thinking, C language is process-oriented, and C ++ Is Object-Oriented.
2. The C language has standard function libraries. They are loose, but put functions with the same functions in a header file. C ++ is tightly integrated with most functions, in particular, the APIs in C ++ are an organic combination of most APIs in the Window system and are a collective. However, you may also call the API separately.
3. Especially in C ++, it is very different from the language graphics. Graph processing functions in C language are basically not used in C ++. The C language standard does not include graphic processing.
4. Both C and C ++ have the structure concept, but in C, the structure only has member variables, but does not have member methods. In C ++, it can have its own member variables and member functions. However, in the C language, the structure members are public and can be accessed for anyone who wants to access it. In VC ++, the structure members do not have a private qualifier.
4. C can write many programs, but C ++ can write more and better. C ++ can write programs based on DOSr, DLL, control, and system.
5. C language organizes program files in a loose way and requires almost all program processing. C ++ organizes files in a project and each file is clearly classified.
6. The IDE in C ++ is very intelligent. Like VB, some functions may be better than VB.
7. C ++ pairs can automatically generate the program structure you want, saving you a lot of time. There are many available tools, such as when you add a class to MFC and when you add a variable.
There are also many additional tools in C ++. You can perform system analysis, view APIs, and view controls.
9. Powerful debugging functions and diverse methods.
In view of the current situation, if you want to learn C #.
C # compared with C ++, C # is a fully object-oriented language, while C ++ is not, in addition, C # is based on the IL intermediate language and. NET Framework CLR, In the portability, maintainability and robustness are greatly improved compared with C ++.
C # is designed to develop fast, stable, and scalable applications. Of course, you can also perform some underlying operations through Interop and Pinvoke, however, we recommend that you use C ++ to write programs that are closely related to the underlying system (such as drivers.
C ++ does not allow calling another constructor (called a Delegate constructor) in a constructor, whereas C # does. The syntax for calling a Delegate constructor is natural and easy to understand. In fact, C ++ does not provide this feature because of syntax considerations, it is out of resource management considerations (there are many such things for C ++ ).
The constructor of C ++ is used to allocate resources, while the constructor is used to release resources. The constructor and the constructor call must match each other. Otherwise, the basic rules of C ++ are broken. If Delegate constructor calls are allowed, the constructor is executed twice, and the Destructor is executed only once. Of course, for some classes, such as the previous Point, this is not a problem, but from the perspective of language mechanisms, this feature may be a "dangerous" feature. Note: In the latest draft C ++ standard proposal, Herb and others have a proposal on allowing delegate constructors to call, of course, this is largely to facilitate C ++/CLI binding.
In the C ++ constructor, virtual function calls are automatically converted into common function calls by the compiler, while the C # constructor allows virtual function calls. In C ++, there is a natural reason for this processing-in C ++, the object is initialized after the constructor is executed. For multi-State objects, this means that the constructor executes a very important thing behind the scenes-initializing the virtual function table of the object.
If we call a virtual function in the base class constructor, the virtual function table of the object is still a virtual function table of the base class, so the correct virtual function call cannot be performed. This is the reason. Generally, we should avoid calling the virtual function in the constructor because it violates the semantics of the virtual function. In C #, the object type information has been initialized before the object's constructor is executed, so normal virtual function calls can be performed.
Basically, these are the differences between the two.
From: dog-like man's Blog