Borland C ++ 4.0上的编译错误 [英] Compilation Errors on Borland C++ 4.0

查看:60
本文介绍了Borland C ++ 4.0上的编译错误的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

好的,我下载了Borland C ++ 4.0。

现在的问题是,当我启动集成开发环境(通过双击BCW.exe)并输入和编译最简单的C程序时,如 - ----->

OK, I downloaded Borland C++ 4.0.
Now the problem is that when I start the Integrated Development Environment (by double clicking BCW.exe) and type and compile simplest C programs such as------->

展开 | 选择 | Wrap | 行号

推荐答案

您显示的文件片段是否显示编译如果你拿出conio.h?


如果你有兴趣学习C,请执行以下操作:


1。获得一个现代编译器。 BC ++ 4大约15岁。由于您可以免费获得高质量的现代编译器,我认为使用旧的BC ++编译器没有任何优势。

2.不要将conio.h用作初学者。这是一个非标准的标题。你开始依赖它,当你的代码失败时,其他人可能无法帮助你。

3.合理地使用空白并按照标准习语使用空格。即使你只有7个演示行,但是有两个不使用空格的实例,正如大多数C程序员所做的那样。将include与文件名分开(包括带有空格的< stdio.h>)。并保持适当的缩进。它可以帮助我们阅读您的代码。它可以帮助您阅读代码。在更大的代码文件中,糟糕的缩进可能是一个噩梦。

Does the file snippet you show compile if you take out conio.h?

If you''re interested in learning C, please do the following:

1. Get a modern compiler. BC++ 4 is about 15 years old. Since you can get top quality modern compilers for free, I see no advantage in using old BC++ compilers.
2. Don''t use conio.h as a beginner. It''s a non standard header. You start relying on it, other people may not be able to help you when your code fails.
3. Use whitespace sensibly and as per standard idioms. Even though you only have 7 demonstration lines, there''s two instances of not using whitespace as most C programmers would. Separate the include from the name of the file (include <stdio.h> with a space). And maintain proper indentation. It helps us read your code. It helps you read your code. In even slightly larger code files, poor indentation can be an nightmare to work with.


PLUS,什么是编译器标志?我们是否需要将它们作为参数传递给命令提示符以启动BCW以支持经典C编程?
PLUS, What are compiler flags? Do we need to pass them as arguements to command prompt to start BCW to support classic C programming?



编译器在编译代码方面有很多选项。我们将这些选项称为编译器标志。对于大多数编译器,您可以通过命令行参数指示这些标志。我不知道Borland C ++ 4是否能像那样工作。编译器是否与IDE分开?我很确定我以前使用过BC ++的v4或v3,但我不记得编译器是否是独立的。


你不需要使用标志来指示C编译。如果您的C程序保存在* .c文件中(扩展名为.c),那么编译器应该足够智能以默认为C编译。

The compiler has a number of options in how it compiles your code. We refer to these options as compiler flags. With most compilers, you indicate these flags through commandline arguments. I don''t know if Borland C++ 4 works like that. Is the compiler separate from the IDE? I''m pretty sure I''ve used v4 or v3 of BC++ before, but I can''t recall if the compiler was separate.

You shouldn''t need to use a flag to indicate C compilation. If your C program is saved in *.c file (with a .c extension) then the compiler should be intelligent enough to default to C compilation.



如果你拿出conio.h,你显示的文件片段是否会编译?
Does the file snippet you show compile if you take out conio.h?



不!!还有26个错误.......

No!! still 26 errors.......


如果您有兴趣学习C,请执行以下操作:


1.获取现代编译器。 BC ++ 4大约15岁。既然您可以免费获得高质量的现代编译器,我认为使用旧的BC ++编译器没有任何优势。
If you''re interested in learning C, please do the following:

1. Get a modern compiler. BC++ 4 is about 15 years old. Since you can get top quality modern compilers for free, I see no advantage in using old BC++ compilers.



好​​的我将下载最新的Borland C ++编译器。我更喜欢不使用其他公司的编译器,因为BORLAND编译器似乎对我有更简单的接口。

顺便问一下你对使用Borland C ++编译器5.5有什么看法。您能否看看下面页面的链接,告诉我它是否对我的需求有用和高效。如果您对它说是,那么我将下载它。

链接

OK I will download the latest Borland C++ compiler. I prefer not to use compilers by other companies, as BORLAND compilers appear to have easier interface to me.
By the way what are your views about using Borland C++ compiler 5.5. Can you please have a look at link to page below and tell me whether it would be useful and efficient for my needs. If you say YES to it, then I will download it.

LINK


2.不要将conio.h用作初学者。这是一个非标准的标题。您开始依赖它,其他人可能无法在您的代码失败时帮助您。
2. Don''t use conio.h as a beginner. It''s a non standard header. You start relying on it, other people may not be able to help you when your code fails.



如果你这样说,我不会使用conio.h。但是如果我想在我的程序中使用clrscr()函数,那么我将需要包含头文件conio.h(据我所知)。有没有替代方案?

OK I will not use conio.h if you say so. But if I want to use clrscr() function in my program, then I will need to include the header file conio.h (as far as I know). Is there any alternative to this?


3.合理使用空白并按照标准习语使用。即使你只有7个演示行,但是有两个不使用空格的实例,正如大多数C程序员所做的那样。将include与文件名分开(包括带有空格的< stdio.h>)。并保持适当的缩进。它可以帮助我们阅读您的代码。它可以帮助您阅读代码。在更大的代码文件中,糟糕的缩进可能是一个噩梦。
3. Use whitespace sensibly and as per standard idioms. Even though you only have 7 demonstration lines, there''s two instances of not using whitespace as most C programmers would. Separate the include from the name of the file (include <stdio.h> with a space). And maintain proper indentation. It helps us read your code. It helps you read your code. In even slightly larger code files, poor indentation can be an nightmare to work with.



感谢您提出宝贵意见。我将记住它们并在我未来的所有程序中实现它们。

Thanks for this valuable advice. I will remember them and implement them in my all future programs.


编译器在编译代码方面有很多选项。我们将这些选项称为编译器标志。对于大多数编译器,您可以通过命令行参数指示这些标志。我不知道Borland C ++ 4是否能像那样工作。编译器是否与IDE分开?我很确定我以前使用过BC ++的v4或v3,但我不记得编译器是否是独立的。


你不需要使用标志来指示C编译。如果您的C程序保存在* .c文件中(扩展名为.c),那么编译器应该足够智能以默认为C编译。
The compiler has a number of options in how it compiles your code. We refer to these options as compiler flags. With most compilers, you indicate these flags through commandline arguments. I don''t know if Borland C++ 4 works like that. Is the compiler separate from the IDE? I''m pretty sure I''ve used v4 or v3 of BC++ before, but I can''t recall if the compiler was separate.

You shouldn''t need to use a flag to indicate C compilation. If your C program is saved in *.c file (with a .c extension) then the compiler should be intelligent enough to default to C compilation.



borland C ++ v3.0和v4.0编译器[BCC.exe]与IDE [BCW.exe]是分开的,我今天尝试了它的''命令行争论。是的,我可以从命令行成功编译我的C程序。但我仍然无法从BC ++ 4.0 IDE编译我的简单C程序。


谢谢...............

在这里等待你的建议........


============

AmbrNewlearner

============

The borland C++ v3.0 and v4.0 compilers [BCC.exe] are separate from IDE [BCW.exe] and I tried today with it''s Command Line Arguements. And yes I could successfully compile my C programs from command line. But still I cannot compile my simple C programs from BC++ 4.0 IDE.

THANKS...............
Waiting for your advice here........

============
AmbrNewlearner
============



好​​的我将下载最新的Borland C ++编译器。我不喜欢其他公司使用编译器,因为BORLAND编译器似乎更容易与我联系。
OK I will download the latest Borland C++ compiler. I prefer not to use compilers by other companies, as BORLAND compilers appear to have easier interface to me.



5.5免费版是纯命令行。如果你没关系......

The 5.5 free release is pure commandline. If you?re OK with that...


那么你对使用Borland C ++编译器5.5的看法如何?您能否看看下面页面的链接,告诉我它是否对我的需求有用和高效。如果您对它说是,那么我将下载它。
By the way what are your views about using Borland C++ compiler 5.5. Can you please have a look at link to page below and tell me whether it would be useful and efficient for my needs. If you say YES to it, then I will download it.



我不推荐它,因为我认为有更好的选择。但是,如果你坚持使用C,你应该没有任何问题。如果你真的想免费使用Borland编译器,5.5听起来是你最好的选择。来吧,试一试。这是免费的,所以你没有什么可失去的。

I wouldn?t recommend it, because I think there?s better alternatives. But if you?re sticking to C, you should have no problems on it. if you really want to use a Borland compiler for free, 5.5 sounds like your best bet. Go ahead, try it out. It?s free, so you have nothing to lose.


如果你这样说,我不会使用conio.h。但是如果我想在我的程序中使用clrscr()函数,那么我将需要包含头文件conio.h(据我所知)。有没有替代方案?
OK I will not use conio.h if you say so. But if I want to use clrscr() function in my program, then I will need to include the header file conio.h (as far as I know). Is there any alternative to this?



有,但所有这些都有缺点。现在,conio.h和clrscr()是最简单的方法。


我告诉你要避免它,因为使用conio.h必然是一个坏方法。只需要尽可能多的人需要帮助,而不是需要在代码中清除屏幕功能。无论如何,这就是我的想法。所以我告诉你要避免使用conio.h,这样更多的人可以帮助你。例证:你开始依赖clrscr(),我可能无法帮助你。我无法使用clrscr()编译代码。

There are, but all of them carry disadvantages with them. Right now, conio.h and clrscr() is the easiest way.

I?m telling you to avoid it not because using conio.h is necessarily a bad way. It?s just that you need help from as many people as possible more than you need clearing screen functionality in your code. That?s what I think, anyway. So I?m telling you to avoid conio.h, so more people can help you. Case in point: you start relying on clrscr(), I may not be able to help you. I can?t compile code with with clrscr().


是的,我可以从命令行成功编译我的C程序。但我仍然无法从BC ++ 4.0 IDE编译我的简单C程序。
And yes I could successfully compile my C programs from command line. But still I cannot compile my simple C programs from BC++ 4.0 IDE.



我不明白为什么。你的代码是正确的,所以它应该编译并运行正常。这听起来像IDE需要一些配置更改,但它是一个非常老的IDE,这里没有人使用,所以这就是为什么得到它的帮助很难。

And I have no idea why. Your code is correct, so it should compile and run fine. It sounds like the IDE needs some configuration changes, but it?s a really old IDE no one here uses, so that?s why getting help for it is hard.


这篇关于Borland C ++ 4.0上的编译错误的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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