Thread: Difference between C and C++?

  1. #1
    Registered User Fool's Avatar
    Join Date
    Aug 2001
    Posts
    335

    Question Difference between C and C++?

    Just wondering which came first (guessing C) and which is easier to learn (guessing C again)?

    -Fool

  2. #2
    Mayor of Awesometown Govtcheez's Avatar
    Join Date
    Aug 2001
    Location
    MI
    Posts
    8,823
    Yes, C came first.

    C may be easier to learn, but C++ contains almost all of the stuff in C, and some more.

  3. #3
    aur entuluva! mithrandir's Avatar
    Join Date
    Aug 2001
    Posts
    1,209
    C came first (1972?), developed at Bell Labs by Kerrighan and Ritchie.

    C++ was created by Bjarne Stroustrup in the late 70's, although it was really during the early 80's that it gained any significant use.

    I would say learn C++ first. This is because C++ is a superset of C, and you can do exactly the same things as you can in C, and later explore more advanced C++ features (such as Object Oriented programming).

    http://www.research.att.com/~bs/bs_f...l#prerequisite

  4. #4
    Registered User Fool's Avatar
    Join Date
    Aug 2001
    Posts
    335
    This coming semester I'll be doing a "Basic Programming Structures" class to learn inputs, outputs, print and all that. Then we will start to learn how to translate that into a language, we will start with C I believe in second semester. Then C++ first semester of next year and advanced C++ in the following semester. I'll be taking VB and Java and things like that as some of my other classes during that time. Oh and can't forget math and english...

    -Fool

  5. #5
    No Genius That's For Sure
    Join Date
    Aug 2001
    Location
     >' >' >' >'&>' CIS MajorIndiana CNC operator >'&>'FranceSkateboarding, Cno job7>' Swindon, UKCycling & ChessGraphic Analyst
    Posts
    127
    Originally posted by Fool
    This coming semester I'll be doing a "Basic Programming Structures" class to learn inputs, outputs, print and all that. Then we will start to learn how to translate that into a language, we will start with C I believe in second semester. -Fool
    They teach you to program w/out using a programming language? Do you know what they do use? (I am curious about the first part there)

    All the programming I've learned was done so by writing code.

    The main use I could see for learning C is to be able to deal w/all the legacy code out there- and those writing C++ as C since they don't know better.

    VB is fun because it gets you doing some fun things very, very quickly. A lot of people give it a bad rap but I honestly don't understand why.
    He is no fool who gives up what he cannot keep in order to gain what he cannot lose.

  6. #6
    Mayor of Awesometown Govtcheez's Avatar
    Join Date
    Aug 2001
    Location
    MI
    Posts
    8,823
    A lot of people give it a bad rap but I honestly don't understand why.
    Coupla reasons.

    1) It's made by MS, which is enough reason for some people to avoid it completely.

    2) It's still got the name BASIC attached to it, which makes it sound antiquated and dead.

    3) You don't have the sort of power you have with C.

    4) Some people say it's a bit slower (although I personally don't remember that problem)

    I'd recommend VB as a good jumping off point for someone mildly interested in programming, but for someone who wants to get serious I'd suggest C.

  7. #7
    Registered User Fool's Avatar
    Join Date
    Aug 2001
    Posts
    335
    We have a class where we will learn structures of programs. IE: You need an output to display something and things like that. Then second semester we start C, applying the first semester stuff into a lang. The learning structures isn't an entire class, it's a side part to an into to PC programming class.

    -Fool

  8. #8
    Mayor of Awesometown Govtcheez's Avatar
    Join Date
    Aug 2001
    Location
    MI
    Posts
    8,823
    So, kinda like an algorithms class?

  9. #9
    the hat of redundancy hat nvoigt's Avatar
    Join Date
    Aug 2001
    Location
    Hannover, Germany
    Posts
    3,130
    Plus, you can write bad code in every language,
    but VB lacks some features which would steer
    you in the right direction.

    VB is the Dark side of the Force.
    Easy, fast, seductive but ultimatly doomed to failure
    hth
    -nv

    She was so Blonde, she spent 20 minutes looking at the orange juice can because it said "Concentrate."

    When in doubt, read the FAQ.
    Then ask a smart question.

  10. #10
    Registered User Fool's Avatar
    Join Date
    Aug 2001
    Posts
    335
    Originally posted by Govtcheez
    So, kinda like an algorithms class?
    Yeah, pretty much.

    -Fool

  11. #11
    Anti-Terrorist
    Join Date
    Aug 2001
    Location
    mming, Game DevelopmentCSR >&<>&2Minimization of boolean functions, PROM,PLA design >&0>&WA, USA guitar, dogsCommercial Aviation >&>>&USAProgramming
    Posts
    742
    Originally C++ was a superset C when it was know as C with Classes however the true story is that C++ borrowed elements from may languages and only contained 'link compatibility' with C. Now they both have their own international standard and seem to be moving in different directions. C is used for low level programming because it integrates best with the operating systems which themselves are written in C. On the other hand C++ is busy developing the standard libraries which make it a much better choice for high level programming. They say the languges such as JAVA and C# will start to look a lot more like C++ in time, therefore C++ will not likely die out, it is also the language used to measure all other high level languages by.
    I compile code with:
    Visual Studio.NET beta2

  12. #12
    junior member mix0matt's Avatar
    Join Date
    Aug 2001
    Posts
    144

    C v. C++

    Just though i would share this quote i came across the other day on another board.

    It has often been said of C that "it is easy to shoot yourself in the foot". Stroustrup said of C++, "In C++ it's harder to shoot yourself in the foot, but when you do, you blow off your whole leg".
    mxr
    THIS IS NOT JUST A CHRONICLING OF THINGS WE HAVE DONE IN THE PAST BUT OUR RISE TO POWER.

Popular pages Recent additions subscribe to a feed