用Vim编译和运行C ++程序 [英] Compiling and Running a C++ Program with Vim

查看:286
本文介绍了用Vim编译和运行C ++程序的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我知道这听起来真的很蠢,但我已经在Vim编辑器上编写了一个C ++代码,并且我的生活无法弄清楚如何编译和运行它。我知道这是非常简单 - 我已经醒了太久了: - /感谢帮助!

I know this sounds really dumb, but I've written a C++ code on Vim editor and for the life of me can't figure out how to compile and run it. I know this is extremely simple - I've been awake for far too long :-/ thanks for the help!

推荐答案

键入 vim

:wq

然后,在命令行上调用编译器,它不是 vim g ++ clang ++ 或类似:

then, on your command line, invoke the compiler which isn't vim but g++ or clang++ or something like:

g++ -o myCode myCode.cpp

这篇关于用Vim编译和运行C ++程序的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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