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

How to build C++ Development Environment for Linux system

2025-01-18 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Internet Technology >

Share

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

This article mainly explains "Linux system how to build C++ development environment", interested friends may wish to have a look. The method introduced in this paper is simple, fast and practical. Next let the editor to take you to learn "Linux system how to build C++ development environment" bar!

The Linux + compiler must be installed for compiling C++ programs. Yum installation is used here. First switch to the root account, su-root, and then enter the password.

Execute yum install gcc-c++ (not yum install gaming +) to report an error.

This is because yum needs to configure the correct server address, and the server provides the yum installation package, also known as the yum source. The configuration file for configuring the yum source is in the / etc/yum.repos.d/ directory, and you can see that the system comes with two files. The name of the cat file, which prints the entire contents of the file. You can see that the two files are either not configured or the address is inaccessible. You can download the yum source address provided by large domestic manufacturers from the Internet. I have downloaded the source address file CentOS6-Base-163.repo provided by NetEase. I uploaded the file to the network disk. Https://pan.baidu.com/s/1ftav7Fs6DTOF09qMsTqRUA extraction code afoo

Use ftp tool to upload CentOS6-Base-163.repo reported an error, because I log on to ftp using not root account, and upload the file directory only root has access to use root login ftp tool, successful upload now try the yum command to install gaming installation, you can see the various installation packages found by yum version, enter y, and then enter, automatically download and install. Later, there will be an update prompt, and enter y to enter, and the final message shows that the installation is successful. Execute the version +-- Gmail command to try the installation of Gmail + is successful. Ftp uploads the bubble-sorted code file create_bubblesort.cc to Linux with the following code # include # include using namespace std

Void BubbeSort (int arr [], int n) {int I, j, temp; bool exchange; for (I = 0; I

< n; i++) { exchange = false; for(j = n - 1; j >

= I; arr -) / / the first I is the largest {if (arr [j] < arr [j-1]) {temp = arr [j]; arr [j] = arr [j-1]; arr [j-1] = temp; exchange = true;}} if (! exchange) return;}}

Int main () {int arr [10] = {3 int I = 0; I = 0; I

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

Internet Technology

Wechat

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

12
Report