在Linux中使用一个命令编译和运行C ++代码 [英] Compiling and running C++ code with one command in Linux

查看:91
本文介绍了在Linux中使用一个命令编译和运行C ++代码的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我的问题很简单:有没有一种方法可以在Linux的终端中一行编译并运行c ++代码?

My question is simple: Is there a way to compile and run c++ code from the terminal in Linux in one line?

推荐答案

g++ myfile.cpp -o myfile && ./myfile

这篇关于在Linux中使用一个命令编译和运行C ++代码的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆