[obtain all file names in the specified directory]

1. Under linux environment 1.1 introduction to related functions In Linux environment, < dirent h> Is an application program interface, which is mainly used for directory reading operation of file system, and provides several directory data reading functions. Under Linux, all file name information can be obtained by traversing the fold ...

Added by trackz on Thu, 09 Dec 2021 13:13:36 +0200

Structure, pointer, experimental summary

  structural morphology R7-1 calculated average score (20 points) Given the basic information of N students, including student number (string composed of 5 numbers), name (non empty string with length less than 10 and excluding blank characters) and score ([0100] integer in the interval), it is required to calculate their average score a ...

Added by Dominator69 on Thu, 09 Dec 2021 03:14:29 +0200

What is advanced C language? The interviewer asked you to write a calculator? From passing to full mark

catalogue 1. Pass writing 2. Excellent writing 3. Full mark writing method First, we print a menu, accept the value entered by the user, and then judge what algorithm the user wants to use to calculate the two numbers. We use a function to achieve this goal. void menu() { printf("**********************************\n"); printf("******* 1 ...

Added by edontee on Thu, 09 Dec 2021 00:55:53 +0200

[C language brush LeetCode] 1034. Boundary coloring (M)

[ Give you an integer matrix grid of size m x n, representing a grid. I'll give you three more integers   row, col, and color. Each value in the grid represents the color of the grid block at that location. Two grid blocks belong to the same connected component, and all the following conditions shall be met: The two grid blocks are the ...

Added by l053r on Wed, 08 Dec 2021 20:02:36 +0200

Employee information management system

Function description requirement analysis Login: the administrator enters the account and password. Only when the account is correct can he enter the system for operationAdd employee information: enter employee information from the keyboard, and the employee information will be inserted into the linked listDelete employee information: enter t ...

Added by cunoodle2 on Wed, 08 Dec 2021 02:23:38 +0200

C++ IO stream job

Stream: several bytes of data arrive from one end to the other, which is called stream Stream class system: stream objects, and stream operators > >   << Input / output stream ostream class: cout,cerr,clog, istream class cin #include<iostream> using namespace std; void testostream() { cout << "standard ou ...

Added by webzyne on Tue, 07 Dec 2021 21:30:15 +0200

West Post Linux interest group 2020 interview questions

Run the following code and what is the output? Explain why. int i; int main(int argc,char *argv[]){ i--; if(i>sizeof(i)){ printf(">\n"); }else{ printf("<\n"); } return 0; } > The default value of uninitialized global variables is 0, while the value of i after i -- is - 1, which is binary ...

Added by awiedman on Tue, 07 Dec 2021 19:25:37 +0200

First knowledge of virtual functions and polymorphism in C + + classes of C + +

Catalogue of series articles   Article catalog Catalogue of series articlesprefaceI Virtual functions and virtual function tablesII Virtual functions and polymorphisms3, Pure virtual function and ADT4, Virtual destructor5, C + + type conversion summary preface 1, Virtual functions and virtual function tables Virtual func ...

Added by megaalf on Tue, 07 Dec 2021 12:38:12 +0200

Using stack to realize binary conversion

  Conversion ideas:       This code realizes the conversion from decimal to binary, octal and hexadecimal. The code body is implemented by stack. Let's first look at the method of converting decimal to binary. The conversion law is to divide the decimal number by 2 to get the remainder, that is, the remainder first divided ...

Added by Tezread on Mon, 06 Dec 2021 21:52:44 +0200

32 single chip microcomputer controls the rotation of YINGDIAN T80 motor

32 single chip microcomputer controls T80 brushless motor through good YINGDIAN regulation Control principle of electric regulator Why do we need electrical regulation The speed, positive and negative indicators of brushless motor are realized by changing the duty cycle and frequency of control signal (PWM). We can easily control PWM wit ...

Added by alivec on Mon, 06 Dec 2021 21:26:31 +0200