Object-oriented programming 2020 for the first time jobs (+ practice quiz questions)

This work belongs courses 2020 Charms object-oriented programming
Where the job requires Winter operations [1] ( https://www.cnblogs.com/jhy16193335/p/12212380.html )
The target job Install the development environment, understand the compilation process to achieve the vernacular programming, recording the learning process, publish blog
Text of the job Questions and Answers, Practice questions
Other references [Text how to run c program in windows command line] ( https://zhidao.baidu.com/question/366892157337055052.html )

Questions and Answers:
In my opinion, the defect is mainly reflected in the C language syntax is not strict restrictions, constraints on the variables is not strict, and this will lead to insecurity throughout the program. Most of the errors in C language and can not find a simple compiler, we need to debug the results by themselves. There are an array of cross-border issues such as border issues in dealing with (a topic like Minesweeper before) is reflected very clearly. There integer overflow, for real and integer variable type has a certain range, beyond which a certain variable range, the value will overflow, consideration must be achieved by the array. There string input by the input string "scanf ("% s, a []) " and" gets () "to achieve, but if forget" gets () "will swallow the transport, will lead to follow-up input and output problems.
Since I currently do not know C ++, I generally through access to information ( "C ++ Prime Plus") can be obtained advantages compared to C ++ and C language is that: C programming language is a process-oriented language, C ++ is object-oriented programming language using a structured programming language .C, top-down, so that the C language easy to maintain, but not conducive to large-scale preparation of the program; the C ++ object-oriented, the problem is decomposed into individual objects, the purpose is not to create an object to complete one step, but to describe the behavior of a thing in the whole question of the step .OOP (object oriented programming) design class, the class defines what data can be used to represent data objects and which operation is performed. Then, of OOP also helps to create reusable code information hiding can protect data from inappropriate access. polymorphism is the ability to create multiple operators and functions Definition, by programming context definitions used to determine which inherited the old class can use to derive new classes. At the same time, C ++ also supports generic programming. Emphasize generic programming independent of the particular type of data, it can provide to perform common tasks (such as data sorting or merge linked list) of the tool
C language compiler processes: C source -> precompiled processing -> compiler -> assembler -> link
from the .i file to .c file, a process known as pre-treatment;
a .i .s file to file, a process known as compilation;
the .s files to .o files, a process known as compilation;
The .o files into an executable file, this process is called a link.
Practice questions:
1.
Open visual studio interface, select Toolbars -> Command Line -> Developer command prompt and enter cl.exe to see the editor version.
2, first in visual studio interface. On keyboard press win + R, cmd input, to open cmd interface;

then, enter the disk where the program to be compiled, such as the D drive (D colon after the note is in English), and enter the exact address can be compiled .

When compiling C ++ files, type gcc, when entering gcc, the command line displays information: not an internal or external command, operable program or batch file.
Gcc.exe need to add in the environment variable path:
First, open My Computer, right-click Computer, click Properties,
the "Change Settings" -> "Advanced" -> "Environment Variables" -> "System Variables editor "->" New "->" add gcc.exe "can be.

Guess you like

Origin www.cnblogs.com/dudu340/p/12231479.html