我应该学习C ++之前学习C? [英] Should I learn C before learning C++?

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

问题描述

我今天参观一所大学的计算机科学系开放日,并在实验室参观,我们坐了下来,从本科生一对夫妇的最后一年项目中发挥。一个是特别好 - 一类FPS游戏的小行星的。我决定采取在的src 目录一眼发现它是用C ++做的(其他大多数项目都是Java 3D的应用程序)。

I visited a university CS department open day today and in the labs tour we sat down to play with a couple of final-year projects from undergraduate students. One was particularly good - a sort of FPS asteroids game. I decided to take a peek in the src directory to find it was done in C++ (most of the other projects were Java 3D apps).

我没有做过任何前C,但我已经通过一些C code前看着。从我在的.cpp code看到在这场比赛中并没有发生翻天覆地的变化。

I haven't done any C before but I have looked through some C code before. From what I saw in the .cpp code in this game it didn't look very different.

我想学习C或C ++,但很可能会学习其他以后。 有什么优势,我学习的人之前其他如果是这样,哪一个?

I'm interested in learning either C or C++ but will probably learn the other later on. Is there any advantage to me learning one before the other and if so, which one?

推荐答案

有没有必要学习C ++之前学习C。

There is no need to learn C before learning C++.

它们是不同的语言即可。它是一种常见的误解,认为C ++在某种程度上依赖于C和不是自己的完全指定的语言。

They are different languages. It is a common misconception that C++ is in some way dependent on C and not a fully specified language on its own.

只是因为C ++共享了很多相同的语法和许多相同的语义的,并不意味着你需要先学习C。

Just because C++ shares a lot of the same syntax and a lot of the same semantics, does not mean you need to learn C first.

如果你学习C ++,你会最终学会大多数C的与你将学习一段时间语言之间的一些差异。其实它是一个很辛苦的事情写正确的C ++,因为中间的C ++程序员倾向于写C / C ++,这才是真正的你是否没有开始用C或开始使用C ++。

If you learn C++ you will eventually learn most of C with some differences between the languages that you will learn over time. In fact its a very hard thing to write proper C++ because intermediate C++ programmers tend to write C/C++.That is true whether or not you started with C or started with C++.

如果你先知道C,然后就是加好学习C ++。您将知道语言的块开始。如果你不知道C首先那么有没有点侧重于不同的语言。有很多可用的好书和教程,从一无所知开始你将覆盖任何东西,你会从C适用于C ++以及学习。

If you know C first, then that is good plus to learning C++. You will start with knowing a chunk of the language. If you do not know C first then there is no point focusing on a different language. There are plenty of good books and tutorials available that start you from knowing nothing and will cover anything you would learn from C which applies to C++ as well.

<一个href=\"http://stackoverflow.com/questions/145096/is-it-true-that-there-is-no-need-to-learn-c-because-c-contains-everything/145098#145098\">Please看到这个答案进一步的推理。

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

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