Go Back   PCMech Forums > Help & Discussion > Web Design / Development

Need Some Help? Type Your Keywords Here:

Reply
 
LinkBack Thread Tools Search this Thread Rate Thread Display Modes
Old 04-05-2002, 10:31 PM   #1
bah
Member (6 bit)
 
Join Date: Feb 2002
Location: Quebec
Posts: 39
c / c++

What's the diffrence between c and c++ should I start learning c before.. is it like version 1 version 2.. or it's different..

thx
bah is offline   Reply With Quote
Old 04-06-2002, 01:24 AM   #2
Member (7 bit)
 
Join Date: Jul 2000
Location: Australia
Posts: 97
C++ is superset of C. It is C with support for OOP.
They are different in the way to solve computer problems.

In C you think of procedures and functions to used in order to sovle problems.

C++ uses the OO approach.

Some will say use C++ for its better, some will say use C its faster and less complex.

Its all up to you, it depends which one you will be confortable with. Both of them are powerful programming language with it's own advantages and disadvantages.

You can learn C++ without learning C first and vice versa.

Hope this helps

Earlboy
earlboy is offline   Reply With Quote
Old 04-06-2002, 12:43 PM   #3
bah
Member (6 bit)
 
Join Date: Feb 2002
Location: Quebec
Posts: 39
ty

Thanks, that answer my question pretty well...
bah is offline   Reply With Quote
Old 04-09-2002, 10:11 PM   #4
Member (5 bit)
 
JahShuWah's Avatar
 
Join Date: Apr 2002
Location: Tampa
Posts: 30
i would strongly suggest learning C first. it is a procedural programming language and mastering it first will allow you the opportunity to become familiar with general syntax before moving on to C++.

although you can learn C++ independently of C, a thorough understanding of C will prove invaluable in your understanding of the object-oriented principles of C++. it can be difficult enough to grasp object-oriented ideas without compounding the situation because you don't understand simple syntax.

happy learning. bye.
JahShuWah is offline   Reply With Quote
Old 04-14-2002, 12:21 PM   #5
Member (5 bit)
 
Join Date: Apr 2002
Location: Tampa
Posts: 19
Well, your end goal is to know c++, here's a good question, what languages do you already know, what is your knowledge of programming, maybe if you have a basis you can start with c++ COM which is just as good, will you be wanting to use c++ for any other reason than for programming applications, will you want to do any game programming, all sorts of questions to ask yourself, because learning either one takes a very long time.....you might be able to jump into MFC after you learn the basis of COM.....?????
zollodav is offline   Reply With Quote
Old 04-14-2002, 12:50 PM   #6
Member (12 bit)
 
Paul Victorey's Avatar
 
Join Date: Mar 1999
Location: MN or WI
Posts: 3,017
C is very well made for small applications; I use C style programming every now and then when I need something simple.

C++, on the other hand, makes complex programs much easier. OOP is almost required once programs reach a certain level of complexity.

If you want to end up at C++, there are 3 ways. You can learn straight C++, you can go from C to C++, or you can go from Java to C++.

Learning C++ outright means you never learn any bad habits, either from Java or C. It's probably harder, though, to learn good style -- unfortunately, many books, etc. don't teach a very good style.

Learning C++ from C will help you learn the language, but the problem lies in that good C++ style is quite different from good C style. Many C++ programs are written in C-style, which is really no good at all.

Good Java style and good C++ style are quite similar, so it may be the best way to proceed. Java forces you to use OOP, so you can't help but learn how that works. As OOP is one of the most powerful reasons to use C++, it's definately worth learning.

I personally learned them in this order:

C
C++ (but, at this point, I was writing pretty horrible C++)
Java
C++, again (I relearned and corrected my bad form)

Now, although my C++ programming skills are evolving and improving, I would say I have a firm grasp of C++. I didn't find the transitions too terrible, although Java and C++ are close, but different enough to be a pain, at times.

The easiest method, that would yeild the best results, would be C->Java->C++. In C you would learn basic syntax, basic concepts. Don't pay too much attention, in C, to structs, unions, classes, etc, as those things wil be different when you're doing C++. Learning Java will help you use this knowledge of syntax and help you learn the features of object-oriented programming. OOP is a fundamentally different approach than the procedural programming, and it's almost a mindset -- it's a way of thinking about a program.

Once you know how OOP is supposed to work, you can move into C++, where the OOP concepts can be put to use.

In any event, learn good C++ style. Good C++ code is highly modular, highly reusable, and easier to debug. The way to write good C++ is to start with a "top down" approach -- analyze the program you want to have. What classes will you need? How should the classes interact? What public methods does each class need? If you can write a document, with the full public interfaces of each class, before you write a single line of code, you will have a much easier time writing the program itself.
__________________
Paul M. Victorey
------------------
I am not responsible for any problems that may arise as a result of following my advice. This includes, but is not limited to, computer failure, loss of data, nuclear war, famine, boils, no clean laundry, your daughter running off with a biker gang, or armageddon. Take my advice at your own risk.

Last edited by Paul Victorey; 04-14-2002 at 01:00 PM.
Paul Victorey is offline   Reply With Quote
Reply

Bookmarks

Still Need Help? Type Your Keywords Here:


Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is On
Trackbacks are On
Pingbacks are On
Refbacks are On



All times are GMT -5. The time now is 07:54 AM.
Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2012, vBulletin Solutions, Inc.
SEO by vBSEO 3.6.0 PL2