---restore content starts---
Under Root
sudo apt-get update//Updates
sudo apt-get install vim//installation vim
CD ~ Go to home directory
mkdir Creating a Folder
Touch A.C Create a file A.C
A before inserting the Shift+a line before the cursor
I after inserting the shift+i line after the cursor
O Line break
X Delete a character
Do not use void Main () in Linux
: SP [file name] New file
: Set Nu Open line number
Cursor positioning the number of rows that need to be copied +dd the number of lines of text is copied to the Clipboard
ctrl+w+↑↓ button to switch paging
: WQA All files Save and exit
GCC [max.c hello.c]-o main.out//Put max.c hello.c together to compile the executable file named Main.out
Gcc-c max.c-o MAX.O//Compile the file containing the max () function
A large amount of compilation can be saved in the process of separating the header file from the function definition
First, the functions and the main function are divided into different files, the functions are compiled into an. o file, which can be compiled with different main functions without having to include the header file at the head of the main function.
Compile the common framework and classes used into a static library, which is a collection of. o files. You can save a lot of time when you compile.
* So if someone else's static library is. o file I can't read it when I enter a file with VI How do I know how he uses it?
is to do another [function name].h file, just declare this functional head.
For example, the Max function. h file is
int max (int a,int b);
Save it.
So the Max function has these types of files
Max.c
Max.o
Max.h
Of course. h files can be passed in the main function again
Load this file #include "max.h"
Future users if you want to use the Max function just look at max.h to read
Note that when compiling the. O. c file or compile it together
---restore content ends---
Install VIM, simple Linux instructions