Category:C
-
Time:2021-3-8
Using the while loop of C language to print the multiplication table Using the while loop of C language: #include int main(void) { int row = 1; while (row <= 9) { int col = 1; while (col <= row) { printf(“%d * %d = %d\t”, […]
-
Time:2021-3-8
Now we are making an interface to operate different databases through different connection strings. We need to use MySQL database. We haven’t used this database before. We use access and SQL server more. Through some information on the Internet and my own groping, the method of connecting C + + with MySQL is generally clear. […]
-
Time:2021-3-6
Title: masseuse A famous masseuse will receive a steady stream of appointment requests, each appointment can choose to accept or not. There is a break between each appointment, so she can’t accept adjacent appointments. Given an appointment request sequence, find the optimal appointment set for the masseuse (the total appointment time is the longest), […]
-
Time:2021-3-6
The content of this article will be updated according to the needs of bloggers. I hope you will pay more attention to it. Direct insertion sort void InsertSort(int r[]) { int n = sizeof(r) / sizeof(r[0]); for(int i = 1; i < n; ++i) { for(int j = i – 1; j >= 0; –j) […]
-
Time:2021-3-5
Title: surface area of three dimensional body On the ﹣ n * n ﹣ grid, we put some ﹣ 1 * 1 * 1 ﹣ cubes. Each value ﹣ v = grid [i] [J] indicates that ﹣ V cubes are stacked on the corresponding cells (I, J). Please return to the surface area of […]
-
Time:2021-3-5
Today, when I wrote the code, I suddenly wanted to know the running time of the program, so I included the time header file in the code. The include file is not marked red, but it appears in theCLOCKS_PER_SECBut the place marked in red shows undefined identifierCLOCKS_PER_SEC I thought, this is not right. Isn’t it […]
-
Time:2021-3-4
Title: sequence counting [problem description]Xiao Ming wants to know the number of positive integer sequences that satisfy the following conditions:1. The first term is n;2. The second term does not exceed n;3. Starting from the third term, the absolute value of the difference between each term and the first two.How many sequences are there for […]
-
Time:2021-3-4
Timer is a tool class often designed in multithreading programming The principle of timer is very simple Create a new thread Wait in that thread Wait for the specified time to do the task Here, a simple timer is implemented with C + + 11, which includes two modes Periodic scheduled task execution Single delay […]
-
Time:2021-3-3
The function of the following program is to create a piece of shared memory, so that both the parent process and the child process can write data to it. However, it is required that another process can start to write after the parent process or the child process has finished writing, and all of them […]
-
Time:2021-3-3
origin Recently, the gwpca method for remote sensing image fusion is too slow when the bandwidth is relatively large. I need a progress bar to indicate it. Then I went to the library of the progress bar and found that the corresponding library of C / C + + on GitHub does not seem to […]
-
Time:2021-3-2
Title: card grouping Given a deck of cards, an integer is written on each card. At this point, you need to select a number x, so that we can divide the whole deck into one or more groups according to the following rules: Each group has X cards.All cards in the group have the same […]
-
Time:2021-3-2
C + + development screen capture small program, Win32 program, can display the screen capture area and save. The last meteor shower screen program is simply related to GDI drawing. This time, we will briefly introduce several API functions, which are related to GDI drawing. GetDC to get the device environment of the currently created […]