PDA

View Full Version : Difference between C and C++?



Fool
08-15-2001, 07:27 AM
Just wondering which came first (guessing C) and which is easier to learn (guessing C again)?

-Fool

Govtcheez
08-15-2001, 07:38 AM
Yes, C came first.

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

mithrandir
08-15-2001, 07:44 AM
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_faq.html#prerequisite

Fool
08-15-2001, 07:44 AM
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...:rolleyes:

-Fool

Theologian
08-15-2001, 09:24 AM
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.

Govtcheez
08-15-2001, 09:27 AM
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.

Fool
08-15-2001, 09:28 AM
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

Govtcheez
08-15-2001, 09:31 AM
So, kinda like an algorithms class?

nvoigt
08-15-2001, 09:45 AM
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 :p

Fool
08-15-2001, 10:02 AM
Originally posted by Govtcheez
So, kinda like an algorithms class?

Yeah, pretty much.

-Fool

Witch_King
08-15-2001, 01:14 PM
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.

mix0matt
08-15-2001, 01:47 PM
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