Be a Supporter!

C++ Books/Ebooks...

  • 429 Views
  • 6 Replies
New Topic Respond to this Topic
Alchemist94
Alchemist94
  • Member since: Jul. 4, 2007
  • Offline.
Forum Stats
Member
Level 08
Blank Slate
C++ Books/Ebooks... 2010-08-20 13:24:26 Reply

So I just got C++ for dummies, which is meant to be for people with no programming knowledge whatsoever (And I do have some programming knowledge) and I still can't work out what the fuck it's talking about. The first chapter tells you to copy and paste some code into dev-C++ and doesn't explain anything. Are there any books/ebooks you know of that actually explain everything well? I've yet to find a single tutorial or book to explain the whole start of every program.

#include <cstdio>
#include <cstdlib>
#include <iostream>
using namespace std;
int main(int nNumberofArgs, char* pszArgs[]) {
    blah
}

Yeah, I have no idea what any of that does, I've just learnt to write it at the start of every program. I've been trying to learn (And given up every time) c++ for about 5 years. Please don't tell me to learn something like python first, I already know python, I just want somebody to either explain EXACTLY what all of that stuff does, or recommend a book/ebook/series of tutorials. Sorry if this post comes across as whiny, I'm just pissed off about reading a 400 odd page book and still not understanding the first example of code. Thanks in advance.

AndyPerfect
AndyPerfect
  • Member since: Jan. 13, 2005
  • Offline.
Forum Stats
Member
Level 19
Programmer
Response to C++ Books/Ebooks... 2010-08-20 18:54:02 Reply

Check out this link

You'll find a massive list that are freely available as free reads online. There's a list of around 6 or 7 C++ books. In total, there's a couple hundred listed there.

Seltzer
Seltzer
  • Member since: Feb. 21, 2008
  • Offline.
Forum Stats
Member
Level 07
Blank Slate
Response to C++ Books/Ebooks... 2010-08-20 19:48:36 Reply

Here you go;

http://www.cprogramming.com/tutorial/les son1.html

I'm actually in the same boat as you, apparently. I just decided to learn the langue yesterday. This guide is pretty simple to follow, and it explains most of what it uses.

There's also some site on the web that offers a .pdf of their guide, that I can't remember or find a the moment. Do some searching and see if you can find it.

At any rate, good luck.


[]

opeterdamina
opeterdamina
  • Member since: Dec. 10, 2008
  • Offline.
Forum Stats
Member
Level 05
Blank Slate
Response to C++ Books/Ebooks... 2010-09-03 13:34:23 Reply

I never found a good book in english for give you but
the best way is to find a good forun , ask to universitary programers..

Etrnalnoob
Etrnalnoob
  • Member since: Jan. 8, 2007
  • Offline.
Forum Stats
Member
Level 07
Blank Slate
Response to C++ Books/Ebooks... 2010-09-04 02:47:16 Reply

Not sure if you still want an explanation of what that does, but here goes.

The #include <cstdio> stuff is so that certain functions are available for your use (things such as cin << "Text", etc.)

#include is a "preprocessor directive" that tells your program to look for a file, and include it in your program (it's a little more complicated than this, but this is enough to start with.)

using namespace std; means to consider all functions/objects in your code to be within the 'std' namespace. If you didn't write that, you would need to specify using '::' every time you wanted to use something in the std namespace, such as std::cout, or std::string.

int main(int nNumberofArgs, char* pszArgs[]) is your program's point of entry. It means that the function main() returns an integer, and accepts an integer and a pointer to a character array as arguments. (The second part isn't as important when you begin. It will be explained in the book at a later time.)

If you can't figure something out, try googling it. http://www.cplusplus.com/doc/tutorial/ is a fantastic beginners tutorial that I used along with C++ for Dummies. You can also ask on their forums - there are plenty of experienced C++ programmers there that are willing to help you.

Feel free to pm me if you still don't understand.

packetpirate
packetpirate
  • Member since: Sep. 4, 2010
  • Offline.
Forum Stats
Member
Level 01
Blank Slate
Response to C++ Books/Ebooks... 2010-09-04 13:49:32 Reply

Your example code is terrible... I really hope that didn't come from the book. All that's required for a "Hello, World!" application is the following...

#include <iostream>
using std::cout;

int main()
{
     cout << "Hello, world!";
     return 0;
}
fourthfrench
fourthfrench
  • Member since: Aug. 13, 2009
  • Offline.
Forum Stats
Member
Level 05
Blank Slate
Response to C++ Books/Ebooks... 2010-09-05 17:02:46 Reply

here