博客
关于我
强烈建议你试试无所不能的chatGPT,快点击我
ubuntu16.04下使用命令行编译运行C++
阅读量:4231 次
发布时间:2019-05-26

本文共 372 字,大约阅读时间需要 1 分钟。

使用vim或sublime编写测试cpp文件test.cpp

例:

#include
using namespace std;int main(){ int a; cin>>a; cout<

假设保存在Algorithm文件夹下

进入Algorithm文件夹

cd Algorithm

编译test.cpp并命名可执行文件为test_ttt

g++ -o test_ttt test.cpp

执行生成的文件

./test_ttt
即可在终端输入,并输出结果了

---------------------------------------------------------------------------------------------

编译C文件:

gcc -o test_ttt test.c

转载地址:http://zwsqi.baihongyu.com/

你可能感兴趣的文章
Distributed Systems Architecture: A Middleware Approach
查看>>
Beginning XML, 4th Edition
查看>>
Beginning JavaScript, 3rd Edition
查看>>
The TCP/IP Guide: A Comprehensive, Illustrated Internet Protocols Reference [ILLUSTRATED]
查看>>
Fault-Tolerant Systems
查看>>
C Programming for Scientists and Engineers
查看>>
Pragmatic Software Testing: Becoming an Effective and Efficient Test Professional
查看>>
Struts: The Complete Reference, 2nd Edition
查看>>
MCITP Developer: Microsoft SQL Server 2005 Database Solutions Design
查看>>
Text Entry Systems: Mobility, Accessibility, Universality
查看>>
CliffsTestPrep Cisco CCNA
查看>>
Pro PayPal E-Commerce
查看>>
A Guide to MATLAB Object-Oriented Programming
查看>>
Outlook 2007: Beyond the Manual
查看>>
SharePoint 2007 User's Guide: Learning Microsoft's Collaboration and Productivity Platform
查看>>
Word 2007: Beyond the Manual
查看>>
An Introduction to Testing Web Applications with twill and Selenium
查看>>
Accelerated VB 2005
查看>>
Pro Access 2007
查看>>
Excel 2007: Beyond the Manual
查看>>