Jump to content


Photo
- - - - -

C++


  • Please log in to reply
8 replies to this topic

#1 thef007

thef007

    H4x0r

  • Members
  • 33 posts

Posted 08 March 2007 - 01:35 AM

OK, so I want to learn the language of C++, what is the best way for me to go about doing this? I already found a tutorial site http://www.cplusplus.com/doc/tutorial/
If anyone has a better site for me to look at or any tips about how I could practice I would greatly appreciate it.

#2 tehbizz

tehbizz

    Progenitor of noob slaying

  • Members
  • 2,039 posts
  • Gender:Male

Posted 08 March 2007 - 01:38 AM

There's always Beej and then the full text of K&R on www.scribd.com

#3 Ohm

Ohm

    I could have written a book with all of these posts

  • Members
  • 3,209 posts
  • Gender:Male
  • Location:Maine, USA

Posted 08 March 2007 - 08:05 AM

There's always Beej and then the full text of K&R on www.scribd.com


Neither of those will help with C++.

I really recommend getting an actual book. Internet tutorials are often wrong, poorly written and not all that useful. C++ is not trivial, there are a lot of pitfalls and a book like "The C++ Programming Language" will cover all that. It's not a gentle introduction to the concepts though. If you don't already know OOP, you need to learn that first. A good book (that, ironically, it available free on the Internet from mindview.net) that teaches C++ and the concepts at the same time is "Thinking in C++" but after finishing it, I recommend going back to "The C++ Programming Language." No C++ programmer should be without it!

I would also like to point out quickly that C++ is a dinosaur. The more modern dynamic languages are much more fun, Java/C# or Ruby/Python are all easier to learn, that might be a better path.

#4 PurpleJesus

PurpleJesus

    Dangerous free thinker

  • Members
  • 1,578 posts
  • Gender:Male
  • Location:800

Posted 08 March 2007 - 08:29 AM

Also, when you can, instead of copy/paste, type in the examples whenever possible. Go through the process of fixing the typos. I seem to learn better that way.

#5 deadc0de

deadc0de

    SUP3R 31337 P1MP

  • Members
  • 272 posts
  • Location:ring0

Posted 08 March 2007 - 09:32 AM

Never learn from the internet as you are beginning. Books have to have some form of truth in them. So a book that says HAS THE NEW ISO STANDARD has to have the "New ISO standard". They can't lie about it in a *non fiction* book. Also books are generally formatted to make it easier on noobs.


I personally recommend Visual Studio (or just Visual C++) 2005 and the book "Teach yourself C++ in 21 days".


There's always Beej and then the full text of K&R on www.scribd.com


Neither of those will help with C++.

I really recommend getting an actual book. Internet tutorials are often wrong, poorly written and not all that useful. C++ is not trivial, there are a lot of pitfalls and a book like "The C++ Programming Language" will cover all that. It's not a gentle introduction to the concepts though. If you don't already know OOP, you need to learn that first. A good book (that, ironically, it available free on the Internet from mindview.net) that teaches C++ and the concepts at the same time is "Thinking in C++" but after finishing it, I recommend going back to "The C++ Programming Language." No C++ programmer should be without it!

I would also like to point out quickly that C++ is a dinosaur. The more modern dynamic languages are much more fun, Java/C# or Ruby/Python are all easier to learn, that might be a better path.



Not to contest, but C++ is still one of THE most powerful languages in existence. I'd be willing to say a good 90% of corporations still use it. A new standard (C++0x) should be out in 2008-2009. Java is essentially a resource whore because it needs the Java Virtual Machine to run. Nice for complicated web apps, but that's all it's good for. C# is nice. Python is probably your only good other option if C++ isn't what you want to do because python is a very close relative of it and often used by C++ programmers to drop a quick prototype on their new piece software to test out algorithms or what-not.

Edited by deadc0de, 08 March 2007 - 09:39 AM.


#6 tiocsti

tiocsti

    rekcah-rebÜ

  • Banned
  • 676 posts

Posted 08 March 2007 - 10:15 AM

deleted.

Edited by tiocsti, 08 December 2007 - 12:47 AM.


#7 Vangald

Vangald

    SUP3R 31337

  • Members
  • 151 posts

Posted 08 March 2007 - 10:52 AM

I tried to learn C++ in the past and it kicked my ass. The concepts I understood, but the implementation is a bitch.

I agree with Ohm. Try Python, C#, hell even any type of Basic (Delphi, VB etc.) as it is alot easier to pick up and start making things with.

The main thing that C++ has over any language (with the exception of maybe assembly) is speed and the ability to know where every tiny bit of info and memory is going to. This is also why C++ is often used for memory intensive programs such as games. However, in due time I can see C# catching up. For most programming though you are not going to see a major difference in speed (especially at the beginner level).

#8 dalejrrocks

dalejrrocks

    SUPR3M3 31337 Mack Daddy P1MP

  • Members
  • 472 posts
  • Location:Alabama

Posted 08 March 2007 - 11:24 AM

Not to contest, but C++ is still one of THE most powerful languages in existence. I'd be willing to say a good 90% of corporations still use it. A new standard (C++0x) should be out in 2008-2009. Java is essentially a resource whore because it needs the Java Virtual Machine to run. Nice for complicated web apps, but that's all it's good for. C# is nice. Python is probably your only good other option if C++ isn't what you want to do because python is a very close relative of it and often used by C++ programmers to drop a quick prototype on their new piece software to test out algorithms or what-not.


What's wrong with the JVM? Have you considered that the JVM gives Java one of its most important features which is cross-platform compatibility? Java is a perfectly fine language, and it's useful for a lot more than web applications. Also, efficient Java code doesn't use too many resources and runs well.

Edited by dalejrrocks, 08 March 2007 - 11:24 AM.


#9 deadc0de

deadc0de

    SUP3R 31337 P1MP

  • Members
  • 272 posts
  • Location:ring0

Posted 08 March 2007 - 05:17 PM

Not to contest, but C++ is still one of THE most powerful languages in existence. I'd be willing to say a good 90% of corporations still use it. A new standard (C++0x) should be out in 2008-2009. Java is essentially a resource whore because it needs the Java Virtual Machine to run. Nice for complicated web apps, but that's all it's good for. C# is nice. Python is probably your only good other option if C++ isn't what you want to do because python is a very close relative of it and often used by C++ programmers to drop a quick prototype on their new piece software to test out algorithms or what-not.


What's wrong with the JVM? Have you considered that the JVM gives Java one of its most important features which is cross-platform compatibility? Java is a perfectly fine language, and it's useful for a lot more than web applications. Also, efficient Java code doesn't use too many resources and runs well.


In comparison, C++ > Java under any circumstance outside of web apps. C++ is faster, and cleaner (when coded right) than java. Do a Hello World test on a java app and a C++ or C app to see the differences. Beside java being cross platform when offline and online, PERL and python are also natively cross-platform.

C++ is incredibly fast at execution as seen here.

Java is catching up to C++ in execution speed but it's more preference when you choose between java, PERL, or Python. If your a really experienced C++ coder, C++ can be made cross platform too through various libraries and blow the life out of the other options.


I tried to learn C++ in the past and it kicked my ass. The concepts I understood, but the implementation is a bitch.

I agree with Ohm. Try Python, C#, hell even any type of Basic (Delphi, VB etc.) as it is alot easier to pick up and start making things with.

The main thing that C++ has over any language (with the exception of maybe assembly) is speed and the ability to know where every tiny bit of info and memory is going to. This is also why C++ is often used for memory intensive programs such as games. However, in due time I can see C# catching up. For most programming though you are not going to see a major difference in speed (especially at the beginner level).



I once read a study somewhere that said assembly code is actually losing it's advantages now. This is because the way various compilers make code into ASM. Humans can make errors with memory registries and various flags. Compiler's automated tasks rarely make a mistake. Not saying that ASM is bad, but what that study said seems to be reasonably true if you think about it. You are correct though, there probably is not a huge noticeable difference in execution times until you get into more complex situations.

Edited by deadc0de, 08 March 2007 - 05:20 PM.





BinRev is hosted by the great people at Lunarpages!