C ++ vs C. [英] C++ vs C

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

问题描述

您好,

我正在编写一个嵌入式应用程序,我正在尝试用C或C ++来决定是否使用
。有谁知道我在哪里可以找到一些统计数据

数据比较两种语言(大小和性能)?


谢谢,

Nataly

解决方案

natush写道:

你好,我正在写一个嵌入式应用程序,我正在尝试决定是用C还是C ++来做。有谁知道我在哪里可以找到一些统计数据比较两种语言(大小和性能)?

谢谢,
Nataly



你好Nataly,


我不认为你可以对这两种语言进行比较

(按大小计算或性能)。一般来说它们都是可用的。


也许你应该考虑你可以得到的性能

编译器你将要使用。


无论如何,他们都很高效(如果编译得很好)。

可能你需要一个图书馆或类似的东西,你应该看到如果

它有C或C ++版本。


再见


Andrea


natush写道:

你好,我正在写一个嵌入式应用程序,我正在努力决定是用C还是C ++来做。有谁知道我在哪里可以找到一些统计数据比较两种语言(大小和性能)?



http://www.research.att.com/~bs/esc99.html
http://www23.brinkster.com/noicys /do...eaking-cpp.pdf


-

Ioannis Vranos

http://www23.brinkster.com/noicys


natush写道:

你好,我正在写一个嵌入式应用程序,我正在努力决定是否要在C或C ++。有谁知道我在哪里可以找到一些统计数据比较两种语言(大小和性能)?

谢谢,
Nataly



如果你想要在代码中获得更多抽象,那么C ++可能就是你的b / b
选择。至于代码大小和性能,这主要取决于:


1.您的语言技能

2.编译器的质量


如果我是你,我会在代码方面查看你真正需要的东西

复杂度。您只需要数据抽象和程序吗?然后C是

可能就是你要找的东西。

你需要更高级别的抽象(类)吗?你需要高度灵活的代码(泛型)吗?然后C ++可能是首选语言。


-

问候,

Matthias


Hello,
I''m writing an embedded application and I''m trying to decide whether to
do it in C or C++. Does anyone know where I can find some statistic
data comparing the two languages (size and performance)?

Thanks,
Nataly

解决方案

natush wrote:

Hello,
I''m writing an embedded application and I''m trying to decide whether to
do it in C or C++. Does anyone know where I can find some statistic
data comparing the two languages (size and performance)?

Thanks,
Nataly



Hi Nataly,

I don''t think that you can make a comparison between the two languages
(in term of size or performance). Generally speaking they''re both usable.

Perhaps you should take into account the performance you can get with
the compiler you''re going to use.

Anyway, they''re both efficient (if well compiled).
Probably you''d need a library or something similar and you should see if
it''s available in C or C++.

Bye

Andrea


natush wrote:

Hello,
I''m writing an embedded application and I''m trying to decide whether to
do it in C or C++. Does anyone know where I can find some statistic
data comparing the two languages (size and performance)?



http://www.research.att.com/~bs/esc99.html

http://www23.brinkster.com/noicys/do...eaking-cpp.pdf


--
Ioannis Vranos

http://www23.brinkster.com/noicys


natush wrote:

Hello,
I''m writing an embedded application and I''m trying to decide whether to
do it in C or C++. Does anyone know where I can find some statistic
data comparing the two languages (size and performance)?

Thanks,
Nataly



If you head for more abstraction in your code, then C++ is probably your
choice. As for code size and performance, this depends mostly on:

1. Your skill with the language
2. The quality of your compiler

If I were you, I''d check out what you really need in terms of code
complexity. Do you only need data abstraction and procedures? Then C is
probably what you''re looking for.
Do you need a higher level of abstraction (classes)? Do you need highly
flexible code (generics)? Then C++ is probably the language of choice.

--
Regards,
Matthias


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

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