我如何编译并运行崇高文本2 C程序? [英] How do I compile and run a C program in Sublime Text 2?

查看:201
本文介绍了我如何编译并运行崇高文本2 C程序?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我完全新的编程。我不知道如何编译和放大器;在崇高的文本2运行一个简单的C程序

I am completely new to programming. I have no idea how to compile & run a simple C program in Sublime Text 2.

(在大学里,我被要求使用的Turbo C ++ 3.0,但我发现IDE相当古老。)

(In college I was asked to use Turbo C++ 3.0 but I found that IDE quite ancient.)

我使用Windows 8(64位)。下面是我,当我点击生成错误。

I'm using Windows 8 (x64). Here's the error I got when I clicked on build.

推荐答案

我知道你提到你是新来编程,但是的此页面还可能会帮助你弄清楚发生了什么事情。基本上,它看起来好像你不指定在构建命令正确编译C文件的名称。在该网页给出的示例中,由 $文件中指定要编译的文件参数。

I realize you mentioned that you're new to programming but this page might still help you to figure out what's going on. Basically, it looks as if you're not specifying the name of the C file to compile in the build command correctly. In the example given at that webpage, the file to be compiled is specified by the $file parameter.

编辑:在再次输出来看,尝试保存文件为* .c文件 - 文件>另存为并调用它类似的 HELLO.C 的。 .c扩展是在这种情况下,重要的事情。

Looking again at the output, try saving your file as a *.c file--File->Save As and call it something like Hello.c. The .c extension is the important thing in this case.

编辑2:你不需要两个; 在第4行那不可能是你的问题(应该编译OK)的结束,但它并不需要你不应该进入的习惯。

EDIT 2: You don't need two ; at the end of line 4. That's unlikely to be your problem (should compile ok) but it's not needed and you shouldn't get into the habit.

这篇关于我如何编译并运行崇高文本2 C程序?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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