Visual C ++ 2010_ Chapter 1 Using Visual C ++ 2010 programming

1.1 .NET Framework

  • .NET Framework: Windows operating system component that makes it easier to build software applications and web services.
  • .NET Framework consists of two elements:
    • The common language runtime (Common Language Runtime, CLR)
    • A set of libraries called .NET Framework class library.

User applications are executed in the CLR. .NET Framework class library provides the functionality required to support the implementation of user code in the CLR, independent of this programming language support and use.

Visual C ++ 2010 to develop two different C ++ application:
1. native C ++ program: an application executing on the local computer;
C ++ version to use when writing native C ++ program by the ISO / IEC (International Organization for Standardization / International Electrotechnical Commission) language standard definition.
2.CLR program or C ++ / CLI program: C ++ extended version write applications that run under the control of the CLR.

1.2 CLR

  • CLR is a standardized program execution environment.
  • CLI (Common Language Infrastructure) Common Language Infrastructure, is essentially a virtual machine environment norms, this environment makes a variety of high-level programming language applications can be executed in different system environments, without having to modify or copy the original source code.

Note: CLI is a standard specification; CLR is Microsoft's CLI implementation.

Debug version and Release version of the program

  • Debug version: This version includes information to help users debug the program. Debug using program version, can step through the code if a problem occurs, the data value of the check program.
  • Release Version: does not include debugging information, but opened the compiler code optimization options to provide the most efficient executable module.
    Configuration: Tools menu build-> Congfiguration Manager
    Here Insert Picture Description

After using the debug configuration tested applications, and can work, usually to rebuild the program as a Release version, this will not generate optimized code debug and trace capabilities, make the program run faster and use less memory.

Create an empty console project
to use standard console program in the local C ++, you need to turn off the use of Unicode library.
Set Method: In Character Set Project-> General option under Properties in the Configuration Properties, drop-down selection Not Set.
Here Insert Picture Description
Here Insert Picture Description

Creating CLR console project
Here Insert Picture Description
Here Insert Picture Description
to make the program pause to display the console window, press the Enter key to continue the program, and allow the execution to the end.
Console :: ReadLine ();

Creating Windows Forms Applications
Windows Forms application development GUI-oriented graphic design methods, rather than coding. Graphically by dragging and dropping the GUI component to add it to the application window.
Here Insert Picture Description

In this chapter
Here Insert Picture Description

To be Continue…

Guess you like

Origin blog.csdn.net/madao1234/article/details/84815814