Thread: Reverse Learning

  1. #1
    Registered User
    Join Date
    Sep 2001
    Posts
    4,912

    Reverse Learning

    Well I learned C++ a few years ago, without ever learning C. I've always been able to understand C code on the understanding that it was just, "C without classes" and some other tools like the ease with which you can overload functions. But there's been a lot (and I mean a lot) of different threads regarding the issue of whether or not C++ is just a superset of C. I'd like to learn C, but picking up a regular tutorial won't help, because what I really need to do is just learn to break old C++ habits. If I learned C the traditional way, I'd run into problems. I've tried googling all morning, but as you can tell, finding the difference between "C++" and "C" is pretty difficult on a search engine. So if anyone knows of any sites that teach you how to convert from C++ to C, please let me know.

    Thanks.

  2. #2
    01000011 00100000 0010000
    Join Date
    Jul 2004
    Posts
    38
    Okay, here is what I excerpted from "C++ From The Ground Up" by Herbert Schildt (A programmer on the ANSI C++ committee, so it's not like he is rambling off a bunch of crap that comes from personal opinion.)

    Quote Originally Posted by C++ From The Ground Up (By: Herbert Schildt)
    C++ contains the entire C language. As stated earlier, C is the foundation upon which C++ is built. C++ includes all of C's features, attributes, and benefits. It also adheres to C's philosophy that the programmer, not the language, is in charge. At this point, it is critical to understand that the invention of C++ was not an attempt to create a new programming language. Instead, it was an enhancement to an already highly successful language.

    ...

    One important point to remember is this: Because C++ is a superset of C, once you can program in C++, you can also program in C! Thus, you will actually be learning two programming languages at the same time, with the same effort that you would use to learn only one.
    So basically learning C would be a waste of time because you already know it. Like you said, the only thing you could learn is some other author's style of programming. Also, you C and C++ patriots that hate hearing the two mixed don't subtract reputation from me because I'm quoting a book. Don't shoot the messenger.

  3. #3
    Registered User
    Join Date
    Sep 2001
    Posts
    4,912
    For the most part that's true, but there are examples of C code that won't compile under C++ standards, so I don't care how high up that guys is.

    If I don't know C from C++-only stuff, I don't care how C-compliant C++ is - I DON'T KNOW C!

    edit: I found a 41 page (41 SHORT pages - they make you move to the next web page a lot because I think they might get paid-per-view on their banner ads) C tutorial at howstuffworks.com - I'll try learning the right way - but if anyone knows the kind of web site I'm talking about, please let me know.
    Last edited by sean; 07-22-2004 at 09:49 AM.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Machine Learning with Lego Mindstorms
    By DavidP in forum A Brief History of Cprogramming.com
    Replies: 14
    Last Post: 01-30-2009, 02:34 PM
  2. Problem with my reverse function and its output!
    By Matus in forum C Programming
    Replies: 4
    Last Post: 04-29-2008, 08:33 PM
  3. gethostbyaddr() reverse lookups failing (???)
    By Uncle Rico in forum C Programming
    Replies: 9
    Last Post: 08-19-2005, 09:22 AM
  4. Need Help On a Simple Bank Program
    By oobootsy1 in forum C# Programming
    Replies: 9
    Last Post: 08-08-2005, 10:51 AM
  5. Replies: 7
    Last Post: 03-18-2003, 03:32 PM