![]() |
| | #1 |
| Registered User Join Date: Nov 2009
Posts: 25
| C or C++ |
| JOZZY& Wakko is offline | |
| | #2 |
| Jack of many languages Join Date: Nov 2007 Location: Katy, Texas
Posts: 1,929
| You should learn them both. Lots of common aspects between C and C++.
__________________ Mac and Windows cross platform programmer. Ruby lover. Memorable Quotes From Recent Posts: I can't remember. |
| Dino is offline | |
| | #3 |
| l'Anziano Join Date: Aug 2001
Posts: 2,573
| Agreed. If you are going to learn either C or C++, you might as well learn both. They are used heavily together. C code is very often mixed in with C++ code, especially in legacy code if you ever have to go and read legacy code for any reason. C# is primarily for Windows, but it has been ported to Linux as well. I assume since it has been ported to Linux, you can also write C# code for for Mac OS X...but that is pure speculation on my part. |
| DavidP is offline | |
| | #4 | |
| Mysterious C++ User Join Date: Oct 2007
Posts: 14,099
| Learning both languages is silly. You want to learn either. When learning C++, you would also like to learn something of its low-level basics, which is normally inherited from C, but with some differences. What to choose? Well, aside from the whole what you like best argument, for anything but stubborn integrated platforms, I would choose C++ simply because it is much more powerful and flexible than C, and is a more modern variant of C.
__________________ Using: Microsoft Windows™ 7 Professional (x64), Microsoft Visual Studio™ 2008 Team System I dedicated my life to helping others. This is only a small sample of what they said: "Thanks Elysia. You're a programming master! How the hell do you know every thing?" Quoted... at least once. Quote:
| |
| Elysia is offline | |
| | #5 |
| Jaxom's & Imriel's Dad Join Date: Aug 2006 Location: Alabama
Posts: 801
| On the other hand, however, C++ is still very bloated and slow by comparison. So, if you desire to go into embedded work, I would recommend C. And, BTW, C is more powerful than C++ and is the modern language of choice (in certain circles). I guess the point here is that it is asinine to say "C is better than C++" or "C++ is better than C" as each has a place in the world. No one language is complete enough to handle EVERY task easily (though almost any language could handle any task -- just may not be tooled for it). |
| Kennedy is offline | |
| | #6 |
| Registered User Join Date: Sep 2004 Location: California
Posts: 2,845
| I can already see where this thread is going. Another C vs C++ debate incoming...
__________________ bit∙hub [bit-huhb] n. A source and destination for information. |
| bithub is offline | |
| | #7 | |
| Super Moderator Join Date: Sep 2001
Posts: 4,680
| Quote:
In any case - comparing C# to C and C++ can get kind of silly, anyways. I also think that C and C++ are diverging more and more, it used to just be a matter of having classes and not having classes, but now they have two extremely different styles. | |
| sean is offline | |
| | #8 | |
| Mysterious C++ User Join Date: Oct 2007
Posts: 14,099
| Hehe. Yes, it always turns out that way, does it not? But right now, I have some myths to bust. C is not better than C++. It is not faster than C++. Bloated is subjective. I would prefer to see it packed with a lot of useful features. C++ is as fast as C, or faster. C is also just as fast as C++, or faster. It depends on how you use it and where. And while you say is more a powerful language choice in certain circles, I find that to be a very bold statement. Sure, C is preferred in certain areas, but I do not know if I would exactly call it a modern language or more powerful. Usually there is a reason for C, but more powerful? I simply do not know. But the point I was trying to make is this: C++ will usually get the work done faster than C, so it gets the upper hand (this may change depending on experience, of course, since it is subjective), so if there is a choice between learning C and C++, C++ is usually the better choice IMHO. Of course, this also depends on where you want to write your code. Embedded systems usually only have C compilers. API is still C or Obj-C, but is still accessible from C++. It is simply a choice of preference.
__________________ Using: Microsoft Windows™ 7 Professional (x64), Microsoft Visual Studio™ 2008 Team System I dedicated my life to helping others. This is only a small sample of what they said: "Thanks Elysia. You're a programming master! How the hell do you know every thing?" Quoted... at least once. Quote:
| |
| Elysia is offline | |
| | #9 | |
| Jaxom's & Imriel's Dad Join Date: Aug 2006 Location: Alabama
Posts: 801
| Quote:
| |
| Kennedy is offline | |
| | #10 | |
| Mysterious C++ User Join Date: Oct 2007
Posts: 14,099
| It is, if you make it obvious your post looks like irony, which it did not.
__________________ Using: Microsoft Windows™ 7 Professional (x64), Microsoft Visual Studio™ 2008 Team System I dedicated my life to helping others. This is only a small sample of what they said: "Thanks Elysia. You're a programming master! How the hell do you know every thing?" Quoted... at least once. Quote:
| |
| Elysia is offline | |
| | #11 |
| Registered User Join Date: Nov 2009
Posts: 25
| So it basically comes down to the following questions. 1. Is there anything in C that you can not do in C++ or the other way around. 2. Would that one be best to learn then when you just want to write basic programs to begin with for a Windows or Linux platform? |
| JOZZY& Wakko is offline | |
| | #12 | |
| Mysterious C++ User Join Date: Oct 2007
Posts: 14,099
| 1) Yes, there is plenty that can be done in C++ that cannot be done in C (or at least not in any easy and fast way). I know there are a few things that C can do, but C++ cannot, such as variable-sized arrays, but aside from that, I am not really sure. Regardless, C++ has the big upper hand in this question. 2) I would argue yes. If you use the high constructs of C++, it is very easy to get started writing simple programs. I especially like Accelerated C++ which demonstrates such a way. Using C, it would take a while to get started due to its lower complexity. However, that complexity also exists in C++, but usually it can be abstracted using higher-level methods and/or functions.
__________________ Using: Microsoft Windows™ 7 Professional (x64), Microsoft Visual Studio™ 2008 Team System I dedicated my life to helping others. This is only a small sample of what they said: "Thanks Elysia. You're a programming master! How the hell do you know every thing?" Quoted... at least once. Quote:
Last edited by Elysia; 11-04-2009 at 02:13 PM. | |
| Elysia is offline | |
| | #13 |
| Registered User Join Date: Jan 2005
Posts: 7,137
| If you're just writing basic programs, I'd choose C++ and learn it as C++ (and not C with classes as many books/tutorials teach). But either choice would be fine. |
| Daved is offline | |
| | #14 |
| Registered User Join Date: Nov 2009
Posts: 25
| |
| JOZZY& Wakko is offline | |
| | #15 |
| Registered User Join Date: Dec 2006
Posts: 1,780
| Networking libraries are plenty for both. |
| cyberfish is offline | |
![]() |
| Thread Tools | |
| Display Modes | |
|