Thread: What can I do in c++, that I can't do in c?

  1. #61
    C++まいる!Cをこわせ!
    Join Date
    Oct 2007
    Location
    Inside my computer
    Posts
    24,654
    C != Mastering Low Level Computing
    Different subjects. C is just a means to an end, but other languages (e.g. assembly, C++) can also work towards this end.
    If you want to learn low level computing, you should take a computer architecture course, and even work through assembly.

    C++ is not just "helpful for professional programmers to build large projects", it's a fundamental improvement to every aspect of C, as well. Again, it's up to you, but you seem to have some misconceptions about C++. C++ ranges all the way from low level to high level. You can master low-level programming in C++ too, if you so choose. You just need to stay away from higher-level abstractions. "a lot of syntax I find unnecessary" is a very weak argument. It seems to me more likely that you aren't familiar with the syntax, so you just can't be bothered to learn the syntax regardless if it helps you achieve your goals or not.

    And SQL is unrelated to C and C++. I also use SQL, but that that project which uses the database, I use C#, since C just doesn't cut it (for me). So, it depends on the environment and requirements, really. Also learning C will NOT help make you a better SQL programmer. If you want to learn SQL, go learn SQL, not C. Way different areas.

    You also seem to be under the impression that, if you learn C, you somehow magically are able to gain significant understanding or master over other fields or programming tasks because C can do them. That's not true. If you're going to use heavy object orientation, for example, you're not going to use C. You're going to use C#, C++ or Java. That's because they are better at it that C, even if C can theoretically DO it. But you still have to learn those languages and how to object orientation in an optimal way too. Learning C doesn't teach you that. Similarly, mastering C won't teach you how to use SQL efficiently or even understand it very well. It won't make you a better SQL programmer. What it WILL do is perhaps make you a better C programmer. But that's it.

    If you want to master a subject, then study that subject, not its underpinnings. SQL and C are completely different.
    Quote Originally Posted by Adak View Post
    io.h certainly IS included in some modern compilers. It is no longer part of the standard for C, but it is nevertheless, included in the very latest Pelles C versions.
    Quote Originally Posted by Salem View Post
    You mean it's included as a crutch to help ancient programmers limp along without them having to relearn too much.

    Outside of your DOS world, your header file is meaningless.

  2. #62
    CIS and business major
    Join Date
    Aug 2002
    Posts
    287
    Again, I have read one c++ book in the past week, c++ faqs. And I read through about 95% of it. Over the past couple of weeks, I have been mostly studying c in my free time. I do admit that c feels like it has something missing, which could likely be fulfilled by studying c++. But I do hope to put in (x) number of hours into c before moving onto c++. Thus, I will start studying c++ or something else once I feel that studying c isn't cost beneficial from a time allocation standpoint. Ultimately, I'd like to read and master The Art of Computer Programming, which is highly mathematical. If I find that studying The Art of Computer Programming is (in coding speak), a waste of resources, notably time resources, I will abandon that book as well. But I will likely eventually move onto c++ if it is beneficial for me to do so.

    Also, while studying c does not make me a better SQL programmer compared to actually studying sql, it does improve my understanding of how to write sql code when I have to write sql code. Again, I have limited time resources, so (while studyingC > studyingSomethingElse) ++studyingC;
    Last edited by Terrance; 10-23-2016 at 08:54 AM.

  3. #63
    C++まいる!Cをこわせ!
    Join Date
    Oct 2007
    Location
    Inside my computer
    Posts
    24,654
    Quote Originally Posted by Terrance View Post
    Also, while studying c does not make me a better SQL programmer compared to actually studying sql, it does improve my understanding of how to write sql code when I have to write sql code. Again, I have limited resources, so while I'd like to improve my c skills, I will ++studying c.
    If you mean moving the data from the database after having executed the query, then you may be right. But it won't improve your understanding of sql queries or how they're executed or how to write them in an efficient manner.
    Quote Originally Posted by Adak View Post
    io.h certainly IS included in some modern compilers. It is no longer part of the standard for C, but it is nevertheless, included in the very latest Pelles C versions.
    Quote Originally Posted by Salem View Post
    You mean it's included as a crutch to help ancient programmers limp along without them having to relearn too much.

    Outside of your DOS world, your header file is meaningless.

  4. #64
    CIS and business major
    Join Date
    Aug 2002
    Posts
    287
    My primary goal is to read the book, The Art of Computer Programming. C is nothing but a mere warmup exercise before I begin really delving into programming. My goal is to start The Art of Computer Programming in a few months, in fact I am reading it today to start off with.

    And my sql skills are strong since I am only a business analyst at the moment, so I don't have to improve my skills in that area at the moment.

  5. #65
    Its hard... But im here swgh's Avatar
    Join Date
    Apr 2005
    Location
    England
    Posts
    1,688
    Elysia will defend and fight the C++ corner no matter the road blocks you put up. She is a very
    competent programmer and has a lot of skill with the language - so of course she knows exactly
    what she is talking about, It may be an idea challenge some of her arguments if you don't fully
    understand them - it will make you a better computer scientist in the long run.

    Have you ever attempted low-level abstraction programming before? If not - are you sure it's
    something you want to dive in with? I am not saying C/C++ is the bad place to start - but
    what basics of programming are the familiar with? If you understand top down development,
    repetition, data structures (arrays) and basic I/O then why not leap head first into C++?

    If you want to get your feet wet in the language - start of slow. Learn the complex bits
    when you have a firm grasp on the basics. Do not be afraid of pointers either - they play such
    an important role (especially in C) and is one key are that Java and to a lesser extent C#
    remove you from.
    Double Helix STL

  6. #66
    C++まいる!Cをこわせ!
    Join Date
    Oct 2007
    Location
    Inside my computer
    Posts
    24,654
    I'm not defending C++ per se - I'm defending the idea of choosing a language to study based on sound principles, not on a syntax whim. If the OP wants to study C, that's fine. Just do it on sound principles.
    Quote Originally Posted by Adak View Post
    io.h certainly IS included in some modern compilers. It is no longer part of the standard for C, but it is nevertheless, included in the very latest Pelles C versions.
    Quote Originally Posted by Salem View Post
    You mean it's included as a crutch to help ancient programmers limp along without them having to relearn too much.

    Outside of your DOS world, your header file is meaningless.

  7. #67
    CIS and business major
    Join Date
    Aug 2002
    Posts
    287
    Hi, yes, I have a background in programming. Again, I first learned programming at one of the nation's top coding boot camps 13 years ago. I studied c for over 60 hours per week for a month, and then c++, also at 60 hours per week for two months. I then did 60 hours per week of training in c# and windows programming for two and a half months, and overall I did over 1000 hours of training in c/c++/c#. Although at the time, I was only 21, and I was not able to find a job as a professional computer programmer, as I did not have a degree at the time. Instead, I went back to college, and got a business/CIS degree, which allowed me to specialize in business studies and get a broader education. Now I work as a business analyst, but much of my job consist of programming in SQL, so I have only now gotten the chance to apply my programming skills in the real world, after 13 years of knowing how to code. Since I studied CIS in college and not computer science, I basically never studied c or c++ again.

    Why I like c is that it is so mathematically intuitive, even though I had not written a large c program in over 13 years. The core syntax of c is very basic and intuitive, but I have only been studying it again for a few weeks now. I am already trying to leap over to my final goal which is to read and master the book The Art of Computer Programming. I hope to put a lot of hours into studying this book, and I feel after a few weeks I have already grasped enough of c to make the leap to The Art of Computer Programming, which was my primary goal in the first place.
    Last edited by Terrance; 10-23-2016 at 06:19 PM.

  8. #68
    CIS and business major
    Join Date
    Aug 2002
    Posts
    287
    So I have covered most of the topics covered in a computer science curriculum, even though I don't have a computer science degree. The programming boot camp I took was designed by a college professor, so it covered algorithms and data structures in depth. We covered arrays, linked lists, bubble sorts, and I think recursion, trees, etc. In fact the coding boot camp I took covered almost twice as much c++ (at six weeks, plus personal study time), compared to 4 weeks of c. So it covered everything taught in a computer science curriculum except for compiler design and computer architecture. The second half of the coding boot camp was almost all software engineering in c#, so that is where I really learned to code. It's just unfortunate that after all these years, it is only now that I can apply my programming skills in the real world.
    Last edited by Terrance; 10-23-2016 at 06:40 PM.

  9. #69
    Nasal Demon Xupicor's Avatar
    Join Date
    Sep 2010
    Location
    Poland
    Posts
    179
    Dalai Lama supposedly said: “Be kind whenever possible. It is always possible.”
    By the Elders of the Internet, I tried. I feel like I actively violate the above, but to avoid doing so even more - I have to bow out of this conversation.

  10. #70
    Registered User MutantJohn's Avatar
    Join Date
    Feb 2013
    Posts
    2,665
    Bro, learn C++. The only time you'll ever need C is in the embedded domain where making a C++ compiler isn't worth the effort compared to constructing a C compiler. C++ is literally just as low-level only it offers better higher-level constructs.

    Yes, it takes time. Yes, it's worth it.

  11. #71
    Its hard... But im here swgh's Avatar
    Join Date
    Apr 2005
    Location
    England
    Posts
    1,688
    I have always wondered if C was never created, would Bjarne Stroustrup still created C++? And if so - would
    John Gosling and Sun Microsystems have had enough influence to create Java?
    Double Helix STL

  12. #72
    C++まいる!Cをこわせ!
    Join Date
    Oct 2007
    Location
    Inside my computer
    Posts
    24,654
    Quote Originally Posted by swgh View Post
    I have always wondered if C was never created, would Bjarne Stroustrup still created C++?
    I think he probably would have. His reason for creating C++ is that the tools he needed did not exist. In this case, C existed, so he took it as the base and improved upon it. But that's not to say there aren't other languages that could have served as a base. C++ did not just inherit from C, after all.
    Quote Originally Posted by Adak View Post
    io.h certainly IS included in some modern compilers. It is no longer part of the standard for C, but it is nevertheless, included in the very latest Pelles C versions.
    Quote Originally Posted by Salem View Post
    You mean it's included as a crutch to help ancient programmers limp along without them having to relearn too much.

    Outside of your DOS world, your header file is meaningless.

  13. #73
    Registered User MacNilly's Avatar
    Join Date
    Oct 2005
    Location
    CA, USA
    Posts
    466
    Quote Originally Posted by Terrance View Post
    This means I've studied a lot of algebraic theory, arithmetic, and mathematics of resource allocation, and all of these are the root concepts of the c language.
    Based on everything I've read about the history of C's development, this statement is certainly wrong. I don't think any of those things formed the basis of the C language as a concept.

    Frankly, I don't think C is a particularly good language for expressing mathematics. Any language has the ability to do basic arithmetic, because thats what computers do.

    Instead, I suggest you check out Scheme (which is a Lisp-like language) and Standard ML (more like Haskell syntax) which are both functional languages with a strong basis in mathematics.

    EDIT: I'm not trying to push the OP away from using C or C++; of course its useful and educational to do so, but not for the reasons the OP stated, IMO.
    Last edited by MacNilly; 11-22-2016 at 08:50 AM.

  14. #74
    CIS and business major
    Join Date
    Aug 2002
    Posts
    287
    I'm actually now studying the book The Art of Computer Programming, and doing no specific studying of a particular language.

  15. #75
    Old Took
    Join Date
    Nov 2016
    Location
    Londonistan
    Posts
    121
    That will do you a favour as the book is language agnostic. It's not one of my favourite reads, I believe there are many better algorithm books, but perhaps none so complete.

    You don't seem to have a clue what you want at all.

    You want to be a professional programmer. OK. So choose a couple of languages strongly used in business. Neither C nor C++ are any more. It's no longer the eighties. C and it's big brother C++ are general purpose languages that are often bettered by domain specific languages, or faster to code in with less mistakes higher level languages. The most in-demand languages are SQL, C#, Java, Javascript and Python.
    Then you say you love matrix maths, economics, and game theory. Strange that you don't mention economics uses such things as third order non-linear differential calculations and chaos theory. Whilst this sort of maths can be done in C/C++ it really is pretty far from comfortable, yet it's a breeze in Python. C was originally written as a language to create an operating system. C++ was originally created to add object-oriented programming to C and later generic programming.
    You mention wanting to get close to the metal over and over but never mention why.
    From what you have said there is only one language that is easy to learn, yet remarkably powerful, has general purpose use and is better for maths work than C or C++ and that is Python. Many universities now teach their courses using Python as the main tool rather than C or C++ as it used to be.
    Python for beginners.

Popular pages Recent additions subscribe to a feed

Tags for this Thread