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 run C++ in Linux system

2025-04-05 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Development >

Share

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

Today I will show you how to run C++ in Linux system. The content of the article is good. Now I would like to share it with you. Friends who feel in need can understand it. I hope it will be helpful to you. Let's read it along with the editor's ideas.

The method of running C++ in Linux system

1. Create the hello.cpp file vi hello.cpp2. Program code # include using namespace std; int main () {cout "Hello World!" Endl; return 0;} 3. The generated executable Gmail + is the compiler, and-o specifies the name of the executable as hello. Without this option, the compiler uses the default a.out.

Hello.cpp + hello.cpp-o hello looks at the file with the ls command, and you can see that there are two files, hello.cpp and hello, in the current directory.

$ls hello hello.cpp4. The output of the executing program is: Hello World!

$. / hello Hello World! The above is how to run C++ in the Linux system all the content, more content related to how to run C++ in the Linux system can search the previous article or browse the following article to learn ha! I believe the editor will add more knowledge to you. I hope you can support it!

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

Development

Wechat

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

12
Report