Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

Linux command

2025-04-07 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >

Share

Shulou(Shulou.com)06/03 Report--

Pwd View current path

Rm filename delete file

Rm-rf folder Delete folder

The touch command has two functions: one is to update the time tags of existing files to the current time of the system (the default), and their data will remain intact; the other is to create new empty files.

Ls-l view the details of the file, such as size, etc.

Gcc/g++g++ main.cpp-o main precompilation, compilation, assembly, link generation execution file maing++-c main.cpp first compile without link, generate a file main.o (compiled is a single file, regardless of the linked library path, it is useful when there are many project files, to improve efficiency do not have to compile each).

Main + main.o-o main link, find the only main () function, and finally generate the execution file maing++-E main.cpp pre-compiled Gmail +-E main.cpp > main.e to output the precompilation to main.e for easy viewing. Precompilation assembles all the header files and macro replacements into one file, because only this one file is compiled at compile time. Main.cpp only compiles without assembly (generating file main.s assembly code). The executable file with debug information is equivalent to the Debug version of win.

Write programs:

Int main (int argc, char * argv [])

Argc is an abbreviation for argument count, indicating the number of parameters passed into the main function.

Argv is the abbreviation of argument vector, which represents the parameter sequence or pointer passed into the main function, and the first parameter argv [0] must be the name of the program and contains the complete path where the program is located, so exactly the number of parameters of the main function that we need to enter should be argc-1.

For example:

# include using namespace std;void main (int argc,char * argv []) {for (int iTuno Tipi)

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Servers

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report