开发者

Learning C++ Or C

My question is: Is learning C++ without learning C enough to program any kind of computer progra开发者_StackOverflow社区ms and get the computer to it`s maximum level (Full Control except the tasks that need Assembly language)? Thank you


Yes, there is no point in learning C first if you want to learn C++. They are two different languages and learning C first is not a requirement.

Everything you can do in C you can do in C++ (probably in a safer way too)


I think the important question to ask is 'What do you want to do?'

There are many tasks and situations where neither C or C++ are exactly appropriate. They also present quite a steep learning curve and do not lend themselves to fast results.

If you are starting out I would recommend a simpler language such as Python (or even PHP for web stuff) but don't take my word for it and ask about - form your own opinion.

Knowing C is useful as it lets you know in greater depth what the computer is actually doing, but for the sake of productivity (and your sanity) it's probably best going with something a bit more high-level to start with.


This reminds me of the question "Should I learn driving with manual transmission (stick shift) to drive a truck or automatic transmission to drive a car". Different skill sets and usage really. With C you "think" procedurally. With C++ you "think" of Objects. Your entire program is structures differently. True, the "syntax" of C++ is a super-set of C but these are really two different languages. Because most C++ compilers also compile C code, there is a common misunderstanding that C++ is just an extension of C. This is only true about the syntax not the concept. For example, you use the same alphabet to write in English and French but the languages are very different.

I hope this helps.


C++ is a great place to start and yes, you can do everything with it. There's no advantage to learning C unless you are planning on working on platforms where it is particularly well suited, such as embedded electronics.

If you master C++ as a language and the OO concepts behind it you will have no difficulty picking up any other programming language. What's more you'll have a much better appreciation for memory management than you would get if you started with a slightly higher level language such as Java.

Good luck.


I think it all depends on the platform you wish to develop for.

If you want to develop applications on the Mac or iPhone you need to use the Cocoa and Cocoa Touch frameworks which are (mostly) written in Objective-C.

If you want to develop games for most consoles you need to use the native frameworks which are almost all written in C++.

I'm not sure what the Windows frameworks use, but I'd guess at C++.

The language you use is secondary to the frameworks you'll need to use for the platform you're developing for.


Yes, C++ is (pretty much) a superset of C


C++ is include all of C features and more other features like the support of OOP, so the answer is Yes you can.


it's different languages.. chose depending that you want to do...


Yes, you can start learning C++. Start with non-OOP part of C++, which is similar to C. Then you can move to the OOP part. Most of the books teaching C++ from ground up follow this approach.


me just learn c++ but no problem in understanding c

c++ is much more supportive and safe than c.

although it is a puls puls version...


C++ is all that C is, and then more, so using C++ will not prevent you from doing anything with the computer that you can do in C (although it will in some cases prevent you from writing what in C would normally be an error in any case because C++ compilers use stronger type checking).

Now with respect to "Full Control"; there are some tasks that are the responsibility of the OS, and modern OS's will prevent you from having full control at user level (because processes have to play nicely together). Of course if you are coding for an embedded target, or writing a bootloader or OS, or a kernel mode driver, then you do have full control; and that is why C and C++ are used predominantly for such tasks because they are intrinsically systems-level languages.


I think any language is just medium of expressing one's logic, the main thing is your logic which needs to be perfect. First of all you must understand what are the features that could be explored in C++ that are not available in C.

C is known for its simplicity. If you start learning C, you will very well understand that how crisp and clear this language is. However, it is not a compulsion that you should learn C first and then C++; Its just a recommendation.

Learning C first is like playing level 1 of a game, where C++ is level 2 :-) Having said that you can always play level 2 directly and can equally succeed in that, but with a little difficulty. :-)


I started by learning C++ and it was fine.

However it wouldn't hurt to have a browse through C before diving into C++. Loosely speaking C is a subset and you will learn the fundamentals there. C++ tends to have some tricky topics to grasp so you'll be safer by having strong foundations.


If you are starting programming, I would say start with C. It will give many basics and will let you think in a more low-level way than starting C++. You do not need to be the boss in C, just get the basics that will help in the future.

There is a nice article written by Joel Spolsky (joelonsoftware.com) that talks about how to start.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜