Know C, want to learn C++, which book is right

Started by
17 comments, last by dark_stalker 23 years, 9 months ago
Actually there is a big difference between a type and a class. I''m not a VB programmer but, from what I''ve seen so far, it can''t be polymorphed, inherited, can''t have member functions, private members, friends, et al.

Now I''m maybe wrong all the way because, as I stated before, I''m not a VB guru at all (and actually I''m not a C++ guru neither. If so please correct me.

Anyway, about the books, I found the Teach Yourself C++ pretty good. I also use the C/C++ bible as a reference. It is very helpful when it comes to lower level.

Hope this helps.
Advertisement
While we are on the topic...I really don''t understand why people make such a big difference between C and C++. I do not really see much of a difference...the only real thing I see is that C uses struct and C++ uses class. And class has access rights and polymorphism and stuff. If you know C, take 20 minutes to read about classes...then you know C++! So what I am asking is...is there any other distinction between C and C++?(I know there are little things like C uses stdio and C++ uses iostream, and C uses char*/char[] while C++ uses string but these are very miniscule). Thanks for any help!

-blide
blide@mail.com
-blideblide@mail.com
Blide :
If you think you can learn all there is about classes in 20 minutes, then you do not know much. It takes a long time to start thinking in an object oriented manner, and to structure your pograms that way. If you just make programs like you would in c, but use classes, then you aren''t really doing oop. But to structure your programs in an oop takes a long time.

*** Triality ***
*** Triality ***
Actually...I don't know if this has to do with the fact that I knew what classes were before I learned C but I think very OOP, I use object when needed to represent abstaract things and stuff....but I seriously believe that a person can learn mostly everything about classes in half an hour and people already think in OOP naturally...well at least I did and still do. It just seems natural to group commons things together and model them like in real life. Like in a game u could set up a character class...and derive the different types of characters from it like npc and usercontrolled and baddy etc... People naturally think in OOP, so all they have to learn is the class syntax and access and polymmorphism and a couple of special rules....pretty simple if you ask me!

-blide
blide@mail.com

Edited by - blide on July 24, 2000 12:19:15 PM
-blideblide@mail.com
hey dark stalker, what is all this opinion mumbo jumbo, the guy recommended a book and you ripped into him? If you dont want peoples opinions then dont post on this board asking for them.
Try c++ the core language .... small and powerfull...or if you want to get stronger get the c++ primer...by Lippman
I dont mean to ''flare'', Fletch, but

no one cares??

now you''re going to say I''m immature or something right?
Go ahead.. no one cares!
Online RPGs.. Almost like another life! Except for whenswitching back to real life, sometimes I forget there isn'ta profanity filter..
dark_stalker, i know you're 13 and all, but if you keep bashing people who have helped you, the way you are, i dont think you're going to get much help next time you ask a question.. and i dont think that anyone will even post on this question in the future... so you better change your "i dont care" attitude while it's not too late...

quote:
From what I understand, you've never
used Visual Basic..


Your point? You're the one asking questions on this post and that's what you give in return for all the help/suggestions you get? I would consider changing my behavior if I were you... but of course I'm not you so it's up to you...

quote:
' the ' is a VB comment, incase you didnt know


hmm.. that thing took me ages to figure out.. i mean the symbol for comments in VB... thanks for letting us know....

quote:
// a class.. (C++)
class Person {
char Name
int Age
etc, etc
};


Name should be declared as char *Name; and you need semicolons at the end of your declarations..
also, you need "public:" before all the declarations if you want it to be like your VB declaration...

e.g.

class Person
{
public:
char *Name;
int Age;
// etc, etc
};

-------------------------------
That's just my 200 bucks' worth!

..-=gLaDiAtOr=-..

Edited by - Gladiator on July 25, 2000 1:01:07 PM
It''s sad to see that there are so many misconceptions.
Firstly, a note on blide''s reply: Ok, you may be right that the the C core is still there in C++ and that the grammatical differences may seem miniscule. But then you''re only scratching the surface. The major difference is just as zerwit stated the way you''re programming (from structured to OOP). Sure, one can
do OOP in C but it really ain''t the same thing. Anyway, I''ve yet to hear of a programmer mastering classes, members, virtual functions, friends, polymorphism, encapsulation etc etc in half an hour. It''s ridiculous. Admit it.

As for dark_stalkers dicussion I''m pretty much speechless.
If you don''t care about other peoples'' advice why are you asking?
Please never say "I know what a class is" if you haven''t studied C++, because then you don''t! Classes is a huge subject.
BTW follow the advice to buy a pure C++ book. I can''t imagine what good MFC would do a newbie C++ programmer and I''m sure most people would agree with me on that.

MFC = Microsoft Formatted Confusion

This topic is closed to new replies.

Advertisement