Welcome guests

At present, I am a student in school, and also a programming learner. My road is still very long. I hope to learn and communicate with my colleagues on the way of learning, and to promote a deeper understanding of programming.

xu lai
English Name : Ritchie
Facebook : 13538674314
Twitter : xulai0309@gmail.com
Job : Student


My hometown is Jiujiang City, Jiujiang is a rich and beautiful place, people's life is very abundant, here beautiful mountains and rivers. There are many snacks, pleasant scenery, famous Lushan and Yanshui Pavilion, Xunyang Tower, Yangtze River Bridge and so on. Please enjoy my selected pictures.


Welcome to the software catalog, where five well-known software are collected. Their functions are powerful and convenient, including compilers, databases and virtual machines, which are more suitable for beginners. In addition, handy developed by me makes everyone enjoy the fun of using the software. If you have any software with strong practicability, please recommend it to me.

  • Dev

    Dev-C++ is a C&C++ development tool in Windows environment. It is a free software and complies with GPL protocol. It combines many free software, such as GCC, MinGW32, and can get the latest version of various tools support. Dev-C++ is a very practical programming software. Many famous software are written by it. It enhances the logic on the basis of C.

  • VMware

    VMware (Very Rui, NYSE Code: VMW) virtual machine software is the leading manufacturer of global desktop to Data Center Virtualization solutions. Customers of different sizes around the world rely on VMware to reduce costs and operating costs, ensure business continuity, enhance security and go green. In 2008, VMware, with annual revenue of $1.9 billion, more than 150,000 users and nearly 22,000 partners, was one of the fastest growing listed software companies. VMware is headquartered in Palo Alto, California.

  • VC++6.0

    Visual C++ is a powerful visual software development tool. Since Microsoft introduced Visual C++ 1.0 in 1993, with the advent of new versions, Visual C++ has become the preferred tool for professional programmers to develop software. Although Microsoft has introduced Visual C++. NET (Visual C++ 7.0), its application is limited to Windows 2000, Windows XP and Windows NT4.0. So in practice, more is based on Visual C++ 6.0 platform.

  • Visual Studio

    Visual Studio 2017 can support C, C++, Python, Visual Basic, Node.js, HTML, JavaScript and other major programming languages. It can not only write Windows 10 UWP general-purpose programs, but also develop iOS, Android mobile platform should be VS2017 or even bring its own iOS simulator (which may have been one of them). It used to be a Mac-only development environment) and an Android simulator.


    MySQL is a small relational database management system developed by Swedish MySQL AB Company. It was acquired by Sun Company on January 16, 2008. In 2009, SUN was acquired by Oracal. No one is optimistic about Mysql's future. At present, MySQL is widely used in small and medium-sized websites on the Internet. Because of its small size, fast speed and low total cost of ownership, especially open source, many small and medium-sized websites choose MySQL as their website database in order to reduce the total cost of ownership.

  • Handy

    Handy is a multi-functional software, its design inspiration comes from the iPhone's 3DTouch. This software is composed of screen brushes and blackboard as basic functions and additional calls to PPT, Excel, office and anti-virus software and small functions. After version of the software on the basis of innovation, the original PPT and painting screen functions into one, as well as part of the function optimization and update, there are more surprises behind!


Lorem ipsum dolor sit amet, consectetuer adipiscing elit, sed diam nonummy nibh euismod tincidunt ut laoreet dolore magna aliquam erat volutpat.

  • 18th October,2019

    Talking about pointer

    The flexible use of pointer makes C language more powerful. Pointer is a very important part of C language. It can be said that pointer is the soul of C language.

    1、pointer: the memory of the computer we use is 8g. To better manage memory, the system allocates a number (unique) to each byte (i.e. address) in the memory area. The essence of a pointer is an address, or a number.

    2、pointer variables: when compiling variables, the system will assign an address to them. If another variable is used to store this address, this variable is called a pointer variable to that variable. Pointer variable is a variable used to store pointer (address). Its value is the address of another variable. On 32-bit platforms, the address of all types of variables is 4 bytes..

    3、pointer variable instance: int * p; / / pointer variable to integer variable, used to store the address of integer variable.Int a [5]; int * q = a; / / pointer to the 0 th element of the array.Analysis: int a [5], there are five elements, namely variables a [0], a [1], a [2], a [3], a [4], and a represents the starting address of the 0 element (variable a [0]). The type of variable a [0] is int, so int * P = a; is legal.Char * string = "hello"; / / a pointer variable pointing to a string. String is a pointer variable used to store the first address of the string, and "hello" returns the first address of the string.Int (* foo) (int x, int y); / / pointer to function . Analysis: The bold part of int (* foo) (int x, int y) indicates that foo is a pointer variable, so what kind of pointer variable is it? Let's look at the bold part next: Int (* foo) (int x, int y); this means that foo is a pointer variable to a function that has two parameters of type int and returns data of type int.Struct student * boy; / / pointer variable to struct

    4、Definition and reference of pointer: (1) pointer variable definition: Format of type identifier * variable quantity name; for example: int * point;Note: when defining int * point;, the bold part of * is not a valuer, but the modification point is a pointer variable. How to determine which type of variable the point points to? The next step is to look at the non bold part, where int indicates the point to the int type variable or the address to hold the int type variable. (2) to initialize pointer variables, first look at an example: Description: *Indicates that the variable type is a pointer variable, and the pointer variable name is P1 instead of * P1; If multiple pointer variables are defined in the same line, they should be: int * P1, * P2; not int * P1, P2 or int * P1, P2; There are two ways to initialize pointer variables before definition: Initialization, such as int * p_2 = & B; define first and then initialize。 For example, int * P1; P1 = & A;*P1 is the variable P1 points to;A pointer variable can only point to the value of a variable of the same type. (3) for two operators "*" and "&": &take the address operator.&A is the address of a (the starting address of a's storage space) * pointer operator*P is p. (4) if int array [6] = {1, 2, 3, 4, 5, 6}, * P = array, then p is p the contents of the storage unit; indicates that P points to the array. (5) the starting address of the 0th element in, use the pointer to refer to the element of one-dimensional array: if you use the pointer variable to point to the address of each array element, and then perform value operation on the pointer variable, you can refer to one-dimensional array.For example: int array [5]; array name reference method: array [0], array [1], array [2]; For example: int array [10]; int * P = array; then p I and array I are the array element array [i] address. Note: PI and & array [J] are equivalent, while * (PI) and array [J] are equivalent. (6) reference array elements: Subscript method: array [J].Pointer method: * (P + J) or * (array + J). Array is the first address of the array and is a constant ((for example, 0x00c7), so you cannot perform array + + or + + array operations. For this reason, if you decompose array + + into a simple form: array = array + 1; it's not hard to find us.Int array [10]; int * P = array; where p is a variable and its value is the first address of the array, because P is a variable, you can perform + + operations . Let's look at another example: int a = 100; int * P = & A; After testing: * P + +, (* P) + +, * (P + +); the results are the same. For reasons, see some examples for Example 1: * P++. Note: * pointer + +, pointer points to buf [0], because * and + + are the same priority, and their combination is from right to left, that is, execute pointer + + first, but for pointer + +, it is used before addi. Ng, so first get the value 1 (buf [0]) of the address space that the pointer points to, and then execute the pointer + + operation, that is, the pointer points to the address and shifts 4 bytes (because the pointer is of type int *, the address space pointed to is of type int data, so move it back 4 bytes instead of 1 byte). At this point, the pointer points to buf [1], which is the value of the address space the pointer points to. It's 2 (buf [1]). Example 2: (* P)++. Note: (* pointer) + +, the pointer points to buf [0], because the priority of bracket is higher than + +, first use the pointer value 1 (buf [0]), then the value 1 is + + (get 2), here the address pointed by the pointer does not change, only changes the value of the address space pointed by the pointer, so the address pointed by the pointer is printed twice, both are 010ffc40, and then the value in the space has been divided Match to 2.Example 3: * (P + +).Note: * (pointer + +), the priority of bracket is higher than that of *, so please execute pointer + +, please note, first use pointer + +, then use + +, so, first get the storage space pointed by pointer, the pointer points to buf [0], and the value is 1. Then execute + + on the pointer, and the pointer point address changes to 0093f748, that is, the pointer points to buf [1]. , in order to verify this (that is, the pointer points to buf [1]), the address pointed to by the pointer is printed again, it is found that it changes to 0093f748, and finally the * pointer result is printed to 2 (buf [1]).

  • 26th October,2019

    Learning function

    Functions in C language are equivalent to subroutines or functions in FORTRAN language, and also to processes or functions in Pascal language. Function provides a tedious method for the encapsulation of computation. After that, when using function, it is not necessary to think about how to complete it. With the right function, the programmer doesn't need to think about how to complete the function, but only needs to know what function it has. In C language, function can be used simply, conveniently and efficiently. We often see short functions that are called only once after they have been defined, which makes the code segments clearer and easier to read. So far, the functions we use (such as printf, getchar, putchar, etc.) are all functions provided in the function library. As usual, let's write some functions ourselves. C language does not provide the power operator similar to * * like FORTRAN language. We usually write a power function (m, n) to explain the method of function definition. The power (m, n) function is used to calculate the n power of the integer m, where n is a positive integer. For function call power (2,5), the result value is 32. This function is not a suitable power function, it can only deal with the positive integer power of small integers, but it is enough to explain the problem. (the standard library provides a function pow (x, y) to calculate XY).The following is the definition of the function power (m, n) and the main program that calls it, so we can see a good program structure.

    The common way to define a function is: Return value type function name (0 or more parameter declarations){Declaration partStatement sequence}

    Function definitions can be presented in arbitrary order in one or more source files, but the same function cannot be stored in multiple files. Assuming that the source program is scattered in multiple files, more work needs to be done when compiling and loading, but this is the reason of the operating system, not the attribute of speech. Let's assume that the two functions of main and power are put in the same file, so that the previous knowledge about running C language programs is still valid. The main function calls the power function twice I n the following statements: printf (""% d% d% d \ n "", I, power (2, I), power (- I, 3)); the main function passes two parameters to the power function each time it is called; when the call is completed, the power function returns a formatted integer to the main function and prints it. In the expression, power (2, I) is an integer just like 2 and I .The first statement of the power function, int power (int base, int n), declares the type of the parameter, the name, and the type of the result returned by the function. The parameter name of power function is only valid within power function, and it is invisible to any other function: other functions can use the same parameter name without conflict. The same is true for variables I and P: I in the power function is independent of I in the main function. We usually call the variables presented in the parenthesized list in the function definition as the mode parameters, and the values corresponding to the mode parameters in the function call as the theoretical parameters. The result calculated by the power function is returned to the main function through the return statement. The keyword return can be followed by any expression in the following way: return expression;Functions do not always have return values. A return statement without an expression returns control to the caller, but does not return a useful value. This is the same as arriving at the right end curly bracket of the function, the function "arrives at the end". The main function can also ignore the value returned by the function. You may have noticed that there is a return statement at the end of the main function. Since main itself is a function, it can also return a value to its caller, who is theoretically the execution environment of the program. Generally speaking, a return value of 0 indicates normal termination, and a return value of non-0 indicates an exception or error termination condition. For simplicity, the previous main functions all omit the return statement, but we will include the return statement in the future main functions to remind you that the program should return the status to its execution environment. The declaration statement int power (int m, int n) before the main function indicates that the power function has two parameters of type int and returns a value of type int. This declaration is called the function prototype, which must be different from the definition and usage of the power function. If the definition and usage of the function are not different from the function prototype, it will present errors. The function prototype does not request the same parameter name as the function declaration. In fact, the parameter name in the function prototype is optional, so the above function prototype can also be written in the following way: int power (int, int);However, the appropriate parameter name can play a good role in explaining, so we always indicate the parameter name in the function prototype.Recall that the biggest difference between ANSI C and earlier versions of C is the way functions are declared and defined.

    Where the parameter name is specified in parentheses and the parameter type is declared before the left curly bracket. If the type of a parameter is not declared, it is allowed to be of type int. The function body is the same as in ANSI C. In the initial definition of C language, you can declare the power function at the beginning of the program as follows: int power(); Parameter lists are not allowed in function declarations, so the compiler cannot check the validity of a power function call at this time. In fact, the power function is assumed to return an int type value with acquiescence, so the declaration of the entire function can be omitted. In the function prototype syntax defined in ANSI C, the compiler can easily detect errors in the number and type of parameters in function calls. ANSI C still supports the old-fashioned function declaration and definition, so there can be at least one transition phase. However, we strongly recommend that readers use the new function prototype declaration method when using the new compiler.

    The function declaration should be written into the header function. Programmers who are accustomed to other languages, especially FORTRAN language, may be unfamiliar with the function parameter transfer mode of C language. In C language, all function parameters are transmitted by value. That is to say, the parameter value passed to the called function is stored in the temporary variable instead of the original variable. This is different from other languages. For example, FORTRAN and other languages are called by reference. Pascal uses the var parameter. In these languages, the called function must access the original parameter, not the local copy of the parameter. The main difference is that in C language, the called function can not directly modify the value of variables in the main function, but only the value of its private temporary copy. The advantages of value passing call outweigh the disadvantages. In the called function, the parameter can be regarded as the local variable which is easy to initialize, so the extra variables are less. In this way, the program can be more compact and simple.

    If necessary, it can also let the function modify the variables in the main function. In this case, the caller needs to provide the address of the variable to be set to the called function (from a technical point of view, the address is the pointer to the variable), while the called function needs to declare the corresponding parameter as a pointer type and access the variable indirectly through it. Let's say it's an array parameter, and that's different. When an array name is used as an argument, the value passed to the function is the location or address of the array's starting element -- it does not copy the array element itself. In the called function, the value of array element can be accessed or modified through array subscript.

  • 13th November,2019


    Trap 1: ignore case differences .It's very simple and basic. C language variables are case sensitive. A and a in the code are not the same variables, and undefined a errors are compiled.

    Trap 2: '{}' and '()' are not used correctly .The result of a program usually does not output every element of an array. When compiling {(1,2,3), (4,5,6)}; first, perform comma operation in brackets (take the last value of comma), compile and generate {3,6}; other elements are 0. Write correctly: {1,2,3}, {4,5,6}

    Trap 3: directly add semicolons after include and define for, such as for (int a = 1; a < 10; a);If so, the program usually executes an infinite loop, int a = 1; and (a);If so, the judgment statement is invalid. If (a > 0); a = - 1; a is greater than 0, the result is a = - 1; If it is "include", the program will prompt an error during compilation and cannot reference the library file;If it is "define", for example, "define 200"; when the program is precompiled, 200; including semicolon is replaced by the program, the program cannot be compiled normally . If it's a for loop, it's the same as if, and it doesn't work as expected, and the loop does nothing. A printf statement designed to execute only once. Is (int a = 1; a < 10; a); printf (""% D, a ";); the program only outputs a value once.!

    Trap 4: using loop statements to inadvertently generate infinite loops

    Trap 5: the difference between do.... while and while Execute before judging whether the condition is true or not... It should be executed at least once. And the judge before the execution

    Trap 6: data overflow error

    Trap 7: errors caused by partition / use .Although this is a problem that everyone knows, it still appears.

    Trap 8: variable not defined.Although this is a problem that everyone knows, it still appears.

    Trap 9: forget to add &

    Trap 10: inconsistent input format with scanf function.Every learning C language has encountered this problem. When inputting a and B, I forgot to input comma between ab.Other symbols are not suitable for data input segmentation in any place. For example, scanf ("% s,% D,% s", & A, & B, & C); a gets the content of the entire statement.I propose using spaces instead of other symbols to separate data, which can reduce unnecessary errors.

    Trap 11: a trap where the input data type does not match

    Trap 12: forget to use break in switch statement;If break is forgotten in switch, each case will be identified and} will be executed if the condition is satisfied

    Trap 13: pointer not initialized.Pointer is a variable for storing address. The same as other variables, when the variable is not assigned, the variable stores the original value in memory (the release of memory is similar to the deletion of files, and the data in memory will not be changed unless other data is covered up). The assignment of variable is the cover of data, and the data last run is kept in memory. An unassigned pointer. I don't know where it points.

    Trap 14: dynamically allocated memory exceeded .The program dynamically allocates 5 bytes of memory space, but the assignment exceeds 5 characters, and the data wrongly assigned exceeds the dynamically allocated space.

    Trap 15: not released after memory utilization

  • 28th November,2019

    How to learn data structure

    Stage 1: understand the data structure

    The first: learn it, you should know its purpose, reason and method. Xiaolu suggests reading some basic data structure books, or using Baidu and Google to understand it, and each data structure has its advantages, disadvantages and performance.

    The second step is to learn the content of complexity analysis related to time complexity and space complexity, which is very important, because the data structure and algorithm to be learned later must have performance standards, in order to be able to solve different problems, select the data structure and algorithm with the best performance.

    The third: we have learned the following performance measurement standards. Next, we will start to learn the most commonly used data structures: array, linked list, stack, queue, hash table, jump table, graph, tree, heap and dictionary tree. The first stage does not require us to understand these data structures, but to learn from the following aspects. Source, characteristics, applicable conditions, operation, time complexity analysis and whether it can be optimized. In this period of time, you will encounter various problems and how to solve them. I usually go to Baidu or Google to summarize and record the articles written by others on my notebook.

    stage 2: deep data structure

    The first: record the relevant characteristics and usage of the last ten basic data structures on the notebook, and then conduct in-depth research on each data structure from the beginning. First, add, delete, modify, query and other operations involved in the data structure need to be implemented once by yourself and run once on the machine. The following points should be paid attention to when writing code: boundary conditions, pointers, code specifications.This will make you more awed by the code, and you should take every time you write code seriously. If there is no problem in writing code on the machine, you can write it by yourself with the pen on the notebook, which will help to deepen your understanding of the code logic.

    The second: you may ask that in the first phase, each data structure feature is basically understood. What books or videos can I read to deepen my understanding? I don't recommend videos here. Recommendation. This is not an advertisement. If we want to go deep, we need an authoritative data and an authoritative explanation of what we want to look up. Although the book "Introduction to algorithm" is very thick, I can find what I want every time. It will be looked up as a dictionary and expand our knowledge system.

    The third: independent in-depth research is really boring, so we can analyze real life examples, such as guessing games. We can think about how to guess the right numbers in the shortest time. Maybe you will think of using binary search. Let's ask about the problems of binary search. In the process, we have to ask ourselves more reasons. Only in this way can you expand your knowledge level. For example, if there is duplicate data in binary search, how can we solve it?I still want to emphasize that we must ask ourselves more why, because psychologically speaking, the human brain is in line with the principle of minimum resistance, that is to say, people don't like to do what they think is the most important thing, so here we must oppose it to make further breakthroughs. If you think more than two phases are OK, we will go to the third phase above to retrieve the data structure.

    stage 3: retrieve data structure

    The first: at this time, you may learn a lot about data structure, but it is difficult to use. How can you apply it to practical problems? The first step is to sort out the bits and pieces of knowledge in front of you. How to solve it? With the help of mind map, knowledge can be systematized, which is helpful for us to further strengthen review and consolidation.

    The second: after finishing the above sorting, you will find that in the actual project, many problems involve multiple data structures. Our surface solutions are only for a single data structure. Then try to establish a connection between data structures, such as arrays and linked lists. Each data structure has its advantages and disadvantages. In the process of learning, you will find a number according to the advantages of the structure, which is the disadvantage of another data structure, or the problem that can be solved by this data structure can make up for the problem that cannot be solved by another data structure. After repeated thinking, we can sort out ideas on this basis for future expansion.

    Step three: transform the actual problem into the data structure we have learned. When encountering problems, we can find suitable data structures according to the characteristics of the problems or data. For example, we need to quickly insert, delete, and query data. What data structures can we quickly insert, delete and query by searching in the brain? Balance binary tree, hash table, jump table, etc., and then filter the data structure according to another condition or characteristic of the problem.

    The fourth: how to choose? We use the performance analysis, time complexity and space complexity mentioned later to know how to choose a reasonable solution.


Lorem ipsum dolor sit amet, consectetuer adipiscing elit, sed diam nonummy nibh euismod tincidunt ut laoreet dolore magna aliquam erat volutpat.

EMail *