Learning C++, about C

Started by
17 comments, last by TheSimplerOne 21 years, 5 months ago
quote:TheSimplerOne said:
Ok well I'll read C++ Primer Plus then. I don't know where I'll go after that but...I have time. Thanks everyone, if you want to post URLS of good tutorials for either of the languages that would be nice. Bye


Good choice on a C++ book.

Here are some tutorials:
www.gametutorials.com
www.cprogramming.com
www.cplusplus.com


Hey amigo, I am a coderito sitting in your borito(and cuttin')

[edited by - Fucho on November 7, 2002 7:50:44 PM]
Advertisement
When is the bullshit going to stop? Fucho, stop spreading this C bull, C++ is more modern. You were wrong about more than the quote. Learning C first is learning bullshit you must forget such as the default to int rule. There are many more examples but I do not wish to give a history lesson today.

Basically you need to master the ability of detecting bullshit. People will send you down the "wrong" path. Thus disrupting your learning curve.
I decided to learn C before venturing into C++, and learning C++ is getting to be pretty easy. Although there are some concepts that are hard to grasp, without C I would not have been able to go this far in C++ as fast as I did.

C cannot hurt your programming styles in C++. All you have to do is modify a few things, and you''re set. Plus, 90% of game programmers learned other languages before C++, even Lamothe knew C before C++, I don''t see him complaining

Thomas Sauder
quote:Original post by Anonymous Poster
When is the bullshit going to stop? Fucho, stop spreading this C bull, C++ is more modern. You were wrong about more than the quote. Learning C first is learning bullshit you must forget such as the default to int rule. There are many more examples but I do not wish to give a history lesson today.

Basically you need to master the ability of detecting bullshit. People will send you down the "wrong" path. Thus disrupting your learning curve.



Look man, just shut your ass. C++ is more modern? WTF do you mean by that? C is still widely used today, and it''s not the "wrong" path if you learn it first. If C is "bullshit", then why is it still used? I just think that C is easier for teh beginner. C and C++ are equally good. You tryin to start a flamewar?
quote:I was wondering if there is any reason to learn C before C++

You essentially learn C on your way to learning C++. In fact, if you compile your C language program with a C++ compiler, it should compile with no changes or very few changes.

I learned C before C++ and that has value. It lets you understand the C language so you can differentiate it, and so you can understand how C++ is mostly an extension of C, adding object-oriented features and useful templates.

You may find yourself dealing with libraries and source code written strictly in C, so knowing where C ends and C++ begins will elp you understand the reasoning behind code written in C.

So learning C is time well spent, because you are learning part of C++ as well. It helps you better understand where you cross over from stuctured programming (in C) to object oriented programming (C++), and makes you better equipped to deal with a variety of source code written by others.

Value of good ideas: 10 cents per dozen.
Implementation of the good ideas: Priceless.
Proxima Rebellion - A 3D action sim with a hint of strategy

[edited by - BS-er on November 8, 2002 4:37:28 PM]
Value of good ideas: 10 cents per dozen.Implementation of the good ideas: Priceless.Machines, Anarchy and Destruction - A 3D action sim with a hint of strategy
You obviously don''t know what you are talking about Fucho, shut it before you dig the hole your in deeper.
Fucho, C is still used today? That might be the case but most programmers who prefer the procedural style still take advantage of C++ over C. As Stroustrup has stated, C++ can be used as a better C. I really thing you should do some research before trying to put yourself across as a "veteran" programmer.
hm..so many debates about C and C++, so I'd put some of thoughts in.

Basic of C:
#include              // how you include files#define               // how you define things or "constants"int main()            // how you write your main function / bodyreturn                // it'a about ending a functionfor ( ; ; )           // for loopswitch ()             // switch caseif () else            // if then else statementsvoid myfunction()     // writing your own functionint myvar             // writing your own variablesstruct mystruct       // writing your own structenum myenum           // writing your own enumeration+,-,*,/               // your first arithmetic+=, -=, *=, /=        // a more advanced use of arithmetic>>, <<                // binary shift!<<=, >>=              // a more advanced use of binary shiftint *pointer          // yuck, it's a pointer!malloc, free          // dynamic memory allocation  


Basics of C++:
cout << "hello world" // using cout..again, *using* cout, with a binary shift operator? i wonder how do you binary shift a string...class myclass         // how you write your own classpublic,protected..    // security thingiesconst                 // the true constant finally here!&                     // hm..reference...new delete            // dynamic memory allocation, C++ style.  



now, what you see in a typical C++ tutorial..or I must say, the C++ "Hello World":

#include <iostream.h>

int main()
{
cout << "Hello World" << endl;
return 0;
}

how many C basics that you see compared to C++ basics in that piece of code? Roughly, 3:1. Conclusion? Learn C first. Go C++ after you grasp the basic. If you go straight C++, you kill yourself. Why? There is no way you can create a useful class without knowing how to write a function or variable (which is in C). So, why do people suggest to learn C++ instead of C? Because they think writing a variable is part of C++ basic. When you read a C++ book/tutorial..then the author tells you how to write a variable...he's teaching you C, not C++.

EDIT: some spelling errors

[edited by - alnite on November 9, 2002 12:24:57 AM]
<sarcasm>Oooooooh, that’s why C++ is so puzzling to me I didn''t learn variables! Or functions! *sigh* 2 years of programming and I forgot to learn C. </sarcasm>

My advice. Don''t learn from a newbie... Learn from a book.

This topic is closed to new replies.

Advertisement