![]() |
| | #16 |
| Rampaging 35 Stone Welsh Join Date: Apr 2007
Posts: 2,927
| |
| abachler is offline | |
| | #17 | |
| Super Moderator Join Date: Sep 2001
Posts: 4,680
| Quote:
| |
| sean is offline | |
| | #18 |
| Registered User Join Date: Jan 2005
Posts: 7,137
| >> Learn both. You can absolutely write a real world application in C++ without learning C. Sure, learning C++ entails learning some (or even many) aspects of C, but that's different than learning the C language. A language is more than just syntax. It is techniques and best practices as well. Learning both is an interesting and worthwhile endeavor, but it is hardly required to use either effectively. |
| Daved is offline | |
| | #19 |
| Woof, woof! Join Date: Mar 2007 Location: Australia
Posts: 3,139
| I second both. Anyone silly enough to think just learning C++ and ignoring C will get them through is a fool. "Oh rats, the library is in C, I'm not using it". Why wouldn't you learn both? They're not the same language, but they're very similar in syntax. Knowing C++ doesn't make knowing C any less useful. @Elysia, C is just as 'modern' as C++. OOP is not "the answer to the universe", you'd find C++ violates (or allows you to violate) many principles of SE, friend classes -- please, connascence abuse anyone? It has a bigger standard library you say? Why is it then Boost is such a large dependency for many projects? And yes, there exist libraries that give C much, much more "standard" utilities. Such as glib. Perhaps he means without C API calls? Still, I fail to see how you need C to write a real-world application? Last edited by zacs7; 11-04-2009 at 06:06 PM. |
| zacs7 is offline | |
| | #20 |
| Registered User Join Date: Jan 2005
Posts: 7,137
| I think you're confusing the definition of learning C++. It doesn't mean ignoring the C aspects of it, it just means not learning all the details specific to how to get things done in C. I mean, I took a class in C 14 years ago and promptly forgot it. I haven't written anything in that language since. And I've gotten through as a professional C++ programmer just fine. |
| Daved is offline | |
| | #21 |
| Registered User Join Date: Apr 2006 Location: United States
Posts: 3,202
| > But what are the differences exactly between C and C++ C++ provides OOP built in, exceptions, templates, and a standard library built around those features. Everything else comes from C. For example, as you would have to manage memory in C, you have to manage memory in C++, unless you use "smart pointers" which are pointer-like template classes. Being that is the case, it is rather underwhelming that the standard (I'm referring to C++9x, the version you will probably learn to use yet) only provides one type of smart pointer -- auto_ptr. If you need a smart pointer that does something different than auto-ptr, you have to use a third party library or write the class yourself. > and what would be better to learn? It's basically a pain to learn either so it shouldn't matter where you start. I learned C++ first just because I found this place, and that's not a good reason. If you've never programmed anything before, then you have a very different task: you must first learn how to program. Newbies are better suited to learn how to program on an interpreted language I think, because interpreted languages run all of the code on demand and there is no such thing as memory management. They do more with less coding time. Otherwise, as Mario puts it, "you have to inspect every dark corner of the language." Memory management should not be what programming is. Or at least, learn how to program before we zealots tear you up discussing our opinions on what you should know.
__________________ Os iusti meditabitur sapientiam Et lingua eius loquetur indicium "There is nothing either good or bad, but thinking makes it so." (Shakespeare, Hamlet, Act II scene ii) http://www.myspace.com/whiteflags99 Last edited by whiteflags; 11-05-2009 at 12:01 AM. |
| whiteflags is offline | |
| | #22 | |
| Registered User Join Date: Nov 2009
Posts: 25
| Quote:
It will probably take me some time to figure everything out but I will start with getting a understanding of C. I found a website in my native language that discusses it and offers tutorials and assignments. And then move on to C++. Thanks for all the answers from people here (read them all). But I think best for me is now to leave this topic for what it is before I end up with a brain injury from all the used terms. | |
| JOZZY& Wakko is offline | |
| | #23 | ||||||
| Mysterious C++ User Join Date: Oct 2007
Posts: 14,099
| Quote:
Quote:
Quote:
Quote:
Quote:
I am also half-tempted to say that Java is not a modern language, simply because it is limiting and lacking in so many ways compared to 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 | |
| | #24 | |
| Jaxom's & Imriel's Dad Join Date: Aug 2006 Location: Alabama
Posts: 801
| Quote:
Which is why, as I stated before, it is asinine to say "C++ is better than C" or the other way around. I mean we may as well argue whether Chili is better than swimming. There is no comparison -- Chili is WAY better. EDIT: "There is no comparison -- Chili is WAY better." would be ironic <=== Have to put this disclaimer in for some. | |
| Kennedy is offline | |
| | #25 | |
| Mysterious C++ User Join Date: Oct 2007
Posts: 14,099
| I have stated that C++ is more modern than C. I did not claim C++ is better than C. Obviously this is subjective. Would it be easier for one with a programming background in .NET to start with C++? Yes, it would. And obviously, the whole point of C++ is to give you the tools to get the work done in the fashion you want or require.
__________________ 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 | |
| | #26 | |
| Jaxom's & Imriel's Dad Join Date: Aug 2006 Location: Alabama
Posts: 801
| Oh, my bad. I equated Quote:
| |
| Kennedy is offline | |
| | #27 |
| Code Goddess Join Date: Sep 2001
Posts: 9,661
| >If I got it right C# is basically meant for the Windows OS. C# was designed with .NET in mind, and .NET was designed with Windows in mind. However, both C# and the foundation of .NET (CLI) are standardized such that they're not tied to Windows. >But what are the differences exactly between C and C++ I think this question implies an intersection that one shouldn't assume without proficiency in both languages. The differences run deeper than language features, to the point where actual code in C has only a superficial similarity to actual code in C++. It's safer in the beginning to pretend that C and C++ are unrelated, yet have similar syntax for some fundamental features. >what would be better to learn? I wouldn't presume to tell you what you should learn, but I will say that I've never regretted learning C. I believe that a firm understanding of C and the challenges involved in writing software with C have helped make my C++ better. My advice is to learn the basics of one before learning the other, but ultimately learn both. Learning C and C++ at the same time (or any two languages as the same time) strikes me as an exercise in frustration.
__________________ My best code is written with the delete key. |
| Prelude is offline | |
| | #28 | |
| Mysterious C++ User Join Date: Oct 2007
Posts: 14,099
| OK, but seriously, there IS a reason why games are written in C++ and not C, right? Perhaps we should ponder about that.
__________________ 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 | |
| | #29 | |
| Super Moderator Join Date: Sep 2001
Posts: 4,680
| Quote:
| |
| sean is offline | |
| | #30 |
| Code Goddess Join Date: Sep 2001
Posts: 9,661
| >OK, but seriously, there IS a reason why games are written in >C++ and not C, right? Perhaps we should ponder about that. It's easier to organize large programs in C++ than C? Then again, it's probably just as hard to organize them well, so I suppose games are written by the lowest common denominator. The many critical bugs I encounter in the games I play is proof enough that game programmers are not as good as we'd like to believe. ![]() In reality, I think the hype of OO kind of killed C as a viable option for most new software. It doesn't mean C++ is any better or worse, just that the current generation of developers has been trained to see OO as the single most important aspect of high quality software.
__________________ My best code is written with the delete key. |
| Prelude is offline | |
![]() |
| Thread Tools | |
| Display Modes | |
|