Upload Code
loading-left
loading loading loading
loading-right

Loading

Profile
No self-introduction
codes (6)
C call function
no vote
The main reason for using extern & quot; C & quot; is that the C compiler compiles functions without the type information of parameters and only contains the symbolic name of the function. For example, the & nbsp; int foo (float x) C compiler will compile this function into a similar function_ As long as the C connector finds the symbol to call the function, it will consider the connection successful. In order to achieve function overloading, C + + compiler will compile with function parameter information. For example, it can compile the above functions into functions similar to_ foo_ A symbol like float. Therefore, C calls C + + and uses extern & quot; C & quot; to tell the compiler to compile and encapsulate the interface in the way of C. of course, the C + + syntax in the interface function is compiled in the way of C + +
lylyly14
2018-02-20
0
1
Classic code set
no vote
Topic: there is a pile of peaches on the beach. Five monkeys will share them. The first monkey divided the pile of peaches into five parts, one more. The monkey threw the other into the sea and took one. The second monkey equally divided the remaining peaches into five parts, one more. It also threw one more into the sea and took one. The third, fourth and fifth monkeys all did this. How many peaches were there on the beach? 1. Program analysis: 2. Program source code:
lylyly14
2018-01-16
0
1
GDB modulation and demodulation
no vote
Debugging is a problem for all programmers. How to improve the debugging efficiency of programmers, better and faster to locate the problems in the program, so as to speed up the progress of program development, is a problem that everyone is very concerned about. For example, some debugging tools under Windows familiar to readers, such as breakpoint setting and single step tracking of visual studio, are appreciated by the majority of users. So, what's a good debugging tool for Linux? GDB debugger is a UNIX / Linux program debugging tool organized and released by GNU. Although it has no friendly graphical interface, its powerful functions are comparable with Microsoft's visual studio and other tools. Let's learn GDB debugger step by step.
lylyly14
2018-01-14
0
1
C-cycle structure
no vote
14.5 C cycle structure cycle body is the key object of program design and optimization. This section focuses on the most effective way to handle for and while loops on arm. 14.5.1 loop abort let's first look at the following example. Two different loop exit conditions produce different assembly code. The C source program is shown below.   int fact1 (int n)  {  int i, fact = 1;  for (i = 1; i 《= n; i++)
lylyly14
2017-12-29
0
1
Function call usage
no vote
14.9 the basic principle of function calling function design is to make its function body as small as possible. In this way, the compiler can do more optimization on the function. 14.9.1 to reduce the cost of function call, the cost of function call on arm is smaller than that on non RISC architecture: · generally, the return instruction "BL" or "mov PC, LR" only needs 6 instruction cycles (on ARM7). Multi register load / store instructions LDM and STM (thumb instructions push and pop) are used at the entry and exit of the function to improve the execution efficiency of the function body. AAPCs defines how to pass parameters and return values through registers. The first four integer parameters in the function are passed through the first four registers R0, R1, R2 and R3 of arm. The pass parameter can be a data type compatible with integer, such as char, short, etc.
lylyly14
2017-12-28
1
1
matlab
no vote
function [hlos] = HLOS(ARX,d,psi,psic,Ro)
lylyly14
2017-03-22
0
1
No more~