My c ++ development path (-) learning stage-01

Source: Internet
Author: User

The first decision to learn C ++ comes from a project: You need to upload data on a platform to the server through FTP, resolve the data to the database of another system, and display it in the view. I used C ++ to connect to the platform, so I went to the Xinhua Bookstore and bought a book "learn C ++ easily" to start C ++, I will not comment on the Quality of books. As long as I can get started quickly and learn the knowledge, I am okay. I also upload ppt and source code in my resources. If I am interested, I can download them.

Maybe because I know something about Java, I can get started quickly. I write a program and read the PPT twice. I have read chapter 7 pointer and reference two nights. I slept three o'clock these two nights and got up to work at AM. In the morning of the third day, I felt very tired. I sat down at my desk, dozed off, and opened a calendar that my colleague gave me, the first page of 2013. The word "Strive constrantly for self-improvement, hard up" instantly introduces my eye. There is also a small line of text "Success begin to the moment make up your mind .... "Yes, success begins with the moment of determination. I should strive to improve myself. In the future, we will use this sentence to spur ourselves.

Now, let's summarize the learning results of the past few days.

The C ++ language is a specification that specifies the rules to be followed and the basic functions to be implemented. The specific functions are implemented by software developers, therefore, the C ++ compiler launched by various software developers must support this standard. C ++ development programs are generally divided into edit, preprocess preprocessing, compile compilation, link connection, load loading, and execute. The following is the development flowchart.

The following shows the first hello World Program. My IDE is Microsoft Visual C ++ 2010.

Create-Win 32 console application-select an empty project; Right-click the project to create the test. cpp File

# Include <iostream>/C ++ import headers include IO packages
# Include <windows. h> // Windows API
# Include <tchar. h> // solves the character set

Using namespace STD;

Int main ()
{
Cout <"Hello world! \ N "<Endl; // output to the console

MessageBox (null, _ T ("Hello, hello World! "), _ T (" information "), 0); // a dialog is displayed.

Return 0;
} // A very simple program. I will not introduce it much, because it is not a tutorial, but a summary of my personal learning. I think all the useful things will be put on it in the future.

Data Type: C ++ supports basic data types and export data types. Basic data types include: integer, numeric, implementation, double precision, and valueless. exported data types include: array, pointer, struct, community, enumeration, and class.

Integer is the most basic way to describe natural phenomena. c ++ first provides an integer.

Character Type: it is designed to process ASCII characters. The ASCII value ranges from 0 to 128 ~ 37 and 127 are invisible control characters, while others use 'x' to indicate '\ x' to indicate escape characters.

Boolean: geroge Boole, a British mathematician, created the Logical Algebra C ++. A non-0 value indicates true, and a 0 value indicates false. The character is also an integer

Floating Point: Number with decimal places

Constant. C ++ can be defined by the keyword const or macro (preprocessing command ).

Variable: the defined value can be changed. The actual value of the variable is stored in the memory storage unit. The format is the data type variable identifier.

Basic elements of C ++: keywords, identifiers, operators, and punctuation marks. identifiers are effective character sequences defined by developers to represent Entity Names in programs, it consists of characters, numbers, and symbols.

Main function prototype: int main (INT argc, char * argv []) {} So the C ++ program only has one main function, it is the only function that can be automatically recognized and run by the compiler. the system first calls the main function at runtime. It is the entry function of a program, other functions are called directly or indirectly by the main function.

Preprocessing commands: Pre-processing before program compilation. The most common Commands include file inclusion (header files), Conditional compilation, layout control, and macro replacement.

 

 

 

 

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.