How to build Shell-CLI conforming to POSIX utility conventions--Argtable3 source parsing
2021SC@SDUSC
How to build Shell-CLI conforming to POSIX utility conventions
What is Argtable
Argtable is an open source ANSI C library that parses GNU-style command line options. It simplifies command line analysis by defining declarative API s that can be used to specify command line syntax. argtable automatically generates consistent t ...
Posted by shanksta13 on Sat, 09 Oct 2021 09:40:36 -0700
Friends' favorite String!!!
catalogue
Characteristics of string:
Create string by:
String comparison
Common methods to get from String:
String interception method:
The common methods related to conversion in String are:
String and int
int to String
String to int:
Characteristics of string:
The contents of the string are never mutable. [key points]Because the ...
Posted by waiwai933 on Sat, 09 Oct 2021 02:20:54 -0700
[advanced C language] from entry to penetration (dynamic memory management)
preface: In c/c + + language, sometimes the program can not determine how large the array should be defined, so it is necessary to dynamically obtain more memory space from the system when the program is running. So today we'll learn how dynamic memory allocation works.
1, Why is there dynamic memory allocation
Let's look at this C ...
Posted by BostonMark on Fri, 08 Oct 2021 16:43:09 -0700
gcc generates static library. a and dynamic library. so Xiao Chen can't sleep
One. Generate static library and dynamic library with Gcc.
3. Static library
When the program is compiled, it will be connected to the object code. The existence of static library is not required for program operation.
3. Dynamic library
It is not connected to the object code when the program is compiled, but loaded when the program is runn ...
Posted by jinky32 on Fri, 08 Oct 2021 11:59:03 -0700
gcc generates static library. a and dynamic library. so and their instance usage
1, Generating. a static library and. so dynamic library with gcc
1. Example 1 explanation of Hello program
① Create a directory and edit the generated sample programs hello.h, hello.c, and main.c
(1) Example program hello.h
#ifndef HELLO_H
#define HELLO_H
void hello(const char *name);
#endif
(2) Example program hello.c
#include<st ...
Posted by outpost on Fri, 08 Oct 2021 03:49:23 -0700
Makefile related knowledge (based on the first phase of Weidong mountain course)
1. Disadvantages of traditional gcc -o instruction 9.5
Assuming that there are two C files, a.c and b.c, I call the function in b.c in the main function of A.C, then the compiler directive for generating executable program is:
gcc -o test a.c b.c
This instruction will preprocess, compile and assemble a.c and B.C respectively, finally ge ...
Posted by jfourman on Fri, 08 Oct 2021 01:38:46 -0700
(C language) sequence table experiment
1. (1): write a program to establish a sequence table and output the values of all data elements in the sequence table one by one. Write the main function test results.
Implementation code:
#include<stdio.h>
#define MAXSIZE 100
typedef struct{
int data[MAXSIZE];
int last;
}sequenlist;
int main(){
sequenlist s = {{5,2,4,9,6,7,1},6};
...
Posted by jeppers on Thu, 07 Oct 2021 18:28:25 -0700
Based on the multithreading implementation of Linux C language, find the number of prime numbers from 30000000 to 30001000 (four threads as an example)
1, Procedural thought
Threads are characterized by independence, concurrency, and threads share memory. Think of the main function as a main thread. The work of the main thread is to allocate the number from 30000000, and the four sub threads grab the number from the main thread. This requires an intermediate varia ...
Posted by d22552000 on Thu, 07 Oct 2021 12:01:37 -0700
Source code analysis of Miracle cryptographic algorithm open source library: mraes.c
2021SC@SDUSC Application and practice of software engineering in school of software, Shandong University
1, mraes.c structure
The overall structure of mraec.c is as follows, with fbsub, ftable1 and other arrays, which mainly implements aes_decrypt ,aes_encrypt,aes_end,aes_getreg,aes_init,aes_reset several important functions in the miracl ope ...
Posted by adam_gardner on Thu, 07 Oct 2021 09:25:39 -0700
C + + final course design - hotel room management system (detailed report + source code + detailed notes) (add "25 +" C++&&C language final course design system download address)
Hotel room management system report
catalogue
Hotel room management system report
1, Description
2, Design idea and overall design
3, Detailed design
1. Function realization of main function
2. Realization of reservation function
3, Realization of check-in function
4, Realization of check-out settlement function
5. Reali ...
Posted by leeperryar on Wed, 06 Oct 2021 19:15:07 -0700