C还是C ++? [英] C or C++?

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

问题描述




我是编程新手,再次抱歉我要问C $ / $
或C ++问题。在学习C ++之前需要C吗?并且变得更好用C中的
它是否也能让你成为更好的C ++程序员?或者说要成为一名C +

+程序员,最好不要对C语言有任何了解并以C ++的方式开始新的b / b $ b,就像一些书籍所暗示的那样?

解决方案

我们** ******@gmail.com 写道:





我是新手编程,再次抱歉,我要问C $ / b
或C ++问题。在学习C ++之前需要C吗?



No.


变得更好


in C它是否也让你成为一个更好的C ++程序员?



不一定。有时你必须忘掉一些C的思维方式。


或者是C +


+程序员,最好不要有任何C的知识,并开始用C ++方式新建一个新的?b $ b,正如一些书籍所暗示的那样?



再次,不一定。 C和C ++是两种不同的语言,就像许多人想要混淆它们一样。但是,如果你了解C ++,我怀疑它会更容易学习C(因为它不是C ++的完美子集)。


5月11日晚上11:55,weidong ... @ gmail.com < weidong ... @ gmail.com>

写道:





我是编程的新手,再次抱歉我要问C $ / b
或C ++问题。在学习C ++之前需要C吗?并且变得更好用C中的
它是否也能让你成为更好的C ++程序员?或者说要成为一名C +

+程序员,最好不要对C语言有任何了解并以C ++的方式开始新的b / b $ b,就像一些书籍所暗示的那样?



首先学习C ++,C不需要理解C ++。

在许多情况下,首先学习C是有害的。


[28.2]在学习OO / C ++之前,我应该学习C吗?
http://www.parashift.com/c++-faq-lit....html#faq-28.2


书:加速C ++

[28.7]什么是最好的C ++编程示例指南?


5月12日上午5:55,weidong ... @ gmail.com < weidong ... @ gmail.com>

写道:





我是编程的新手,再次抱歉我要问C $ / b
或C ++问题。在学习C ++之前需要C吗?



No.


变得更好


in C它是否也让你成为一个更好的C ++程序员?



No.


或者是C +


+程序员,最好不要对C语言有任何了解,并以C ++的方式开始一个新的b / b $ b,就像一些书籍所暗示的那样?



是的。


我必须评论一下,人们常常误以为C

是需要学习C ++,因为C ++基于C.

你可以从C中采用坏习惯;)用C或C ++来查看语言和工作更容易



C比便携式汇编程序稍微多一点,那就是它的权力。

但是,在为了理解你的工作原理,你需要先学习至少一个汇编程序。

如果你在C ++旁边学习汇编程序你可以在
$ b中使用它$ b与它结合,然后你就可以完全理解C ++的一部分了。

修辞问题:

为什么没人问学习汇编程序,那么C?:)

它更有意义。


问候,Branimir。



Hi,

I am a newbie to programming, and sorry again that I have to ask the C
or C++ questions. Is C required before learning C++? And become better
in C does it also make you a better C++ programmer? Or that to be a C+
+ programmer, it''s better not to have any knowledge of C and start a
new in the C++ way as some books suggest?

解决方案

we********@gmail.com wrote:

Hi,

I am a newbie to programming, and sorry again that I have to ask the C
or C++ questions. Is C required before learning C++?

No.

And become better

in C does it also make you a better C++ programmer?

Not necessarily. Sometimes you have to "unlearn" some C ways of thinking.

Or that to be a C+

+ programmer, it''s better not to have any knowledge of C and start a
new in the C++ way as some books suggest?

Again, not necessarily. C and C++ are two separate languages, much as
many people want to confuse them. However, if you know C++, I suspect
it''s easier to learn C (since it''s a not-quite-perfect subset of C++).


On May 11, 11:55 pm, "weidong...@gmail.com" <weidong...@gmail.com>
wrote:

Hi,

I am a newbie to programming, and sorry again that I have to ask the C
or C++ questions. Is C required before learning C++? And become better
in C does it also make you a better C++ programmer? Or that to be a C+
+ programmer, it''s better not to have any knowledge of C and start a
new in the C++ way as some books suggest?

Learn C++ first, C is not required to understand C++.
In many cases, learning C first is a detriment.

[28.2] Should I learn C before I learn OO/C++?
http://www.parashift.com/c++-faq-lit....html#faq-28.2

book: Accelerated C++
[28.7] What are some best-of-breed C++ programming-by-example guides?


On May 12, 5:55 am, "weidong...@gmail.com" <weidong...@gmail.com>
wrote:

Hi,

I am a newbie to programming, and sorry again that I have to ask the C
or C++ questions. Is C required before learning C++?

No.

And become better

in C does it also make you a better C++ programmer?

No.

Or that to be a C+

+ programmer, it''s better not to have any knowledge of C and start a
new in the C++ way as some books suggest?

Yes.

I have to comment that it is common misconception that C
is required to learn C++ as C++ is based on C.
You can just adopt bad habits from C ;) It is easier
to peek language and work either in C or C++.
C is little bit more then portable assembler and that''s
where it is it''s power.
But, in order to understand how things work you will
need to learn at least one assembler first.
If you learn assembler beside C++ you can use it in
combination with it , and then you can fully understand C
part of C++.
Rhetorical question:
Why is nobody asking about learning assembler, then C ?:)
It makes much more sense.

Greetings, Branimir.



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

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