为什么有人在C代码上使用c ++编译器? [英] Why would someone use c++ compiler on a C code?

查看:62
本文介绍了为什么有人在C代码上使用c ++编译器?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述



会抑制错误吗?


他是否试图隐藏代码中的错误?


Would it suppress errors?

Is he trying to hide errors in his code?

推荐答案

2005年4月7日9:56< FW3 ... @ sbcglobal.netwrote:
On Apr 7, 9:56 pm, 2005 <FW3...@sbcglobal.netwrote:

它会抑制错误?

他是否试图隐藏代码中的错误?
Would it suppress errors?

Is he trying to hide errors in his code?



他在* .c代码上使用g ++!


gcc& b之间有什么不同cc编译器 - 任何优点?

He is using g++ on a *.c code!

Also what is so different between gcc & cc compiler - any advantages?


2005写道:
2005 wrote:

它会抑制错误吗?


他是否试图隐藏代码中的错误?
Would it suppress errors?

Is he trying to hide errors in his code?



可能反过来说,C ++及其编译器对于问题的数量,特别是类型安全问题更为迂腐。


请注意,两种语言之间有时会出现模糊的语义差异,所以你不建议在家里尝试这个。

除非你知道风险。


-

Ian Collins。

Probably the reverse, C++ and its compilers are more pedantic about a
number of issues, particularly type safety.

Do bear in ming there are sometimes obscure semantic differences between
the two languages, so you would be ill advised to try this at home
unless you are aware of the risks.

--
Ian Collins.


4月7日,10:01 pm,Ian Collins< ian-n ... @ hotmail.comwrote:
On Apr 7, 10:01 pm, Ian Collins <ian-n...@hotmail.comwrote:

2005写道:
2005 wrote:

会抑制错误吗?
Would it suppress errors?


他是否试图隐藏代码中的错误?
Is he trying to hide errors in his code?



可能反过来说,C ++及其编译器对于一些问题,特别是类型安全问题,更加迂腐。


请注意,两种语言之间有时会出现模糊的语义差异,所以你不建议在家里尝试这个。

除非你知道风险。


-

Ian Collins。


Probably the reverse, C++ and its compilers are more pedantic about a
number of issues, particularly type safety.

Do bear in ming there are sometimes obscure semantic differences between
the two languages, so you would be ill advised to try this at home
unless you are aware of the risks.

--
Ian Collins.



我在cc -c上尝试了这段代码。 - 它给出了很多错误

但是当我在C代码上使用g ++时不是这样的。

使用g ++编译器编译C代码是一种很好的做法。 br />

I tried this code on "cc -c" - it gave numerous errors
But non when I did g++ on a C code

Is this a good practice to compile a C code with g++ compiler.


这篇关于为什么有人在C代码上使用c ++编译器?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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