Can anyone reccomend any good C++ books (available on amazon preferably). Im not a total newb (I know java, php and vb.net), i just dont know that particular language that well.

A book which covers data structures and concepts too would be beneficial, as im on a comp/sci course atm, and i want to get a head start on next years stuff.

MosaicFuneral commented: Â +0

I learned C++ 5 years ago from Accelerated C++ by Koenig and Moo. It's pretty good, and gets you introduced to the language relatively quickly (it's not a really thick book).

Well, some mod you are! Don't you see the sticky thread at the top about books? :icon_razz:

A good many of the first shown when you search Amazon look like good prospects, like #4 - C++ for Dummies.

#8 - Starting out with C++, Gaddis is the one I use in my classes. Pretty well written, generally good examples (except I hate his bubble sort example), no major goofs.

ps. It also makes a great doorstop, as most of my students will attest.

commented: ROFLMAO - perfect, just perfect +29

Best C++ book I've ever used: C++ Programming: From problem analysis to problem design... by Malik.

Latest Edition

Best C++ book I've ever used: C++ Programming: From problem analysis to problem design... by Malik.

That's a good one as well. We used to use that, even before it went into commercial publication.

Well, some mod you are! Don't you see the sticky thread at the top about books

I wanted user opinions and views.

I dont like the style of the "for dummies" books at all.

Accelerated C++ has good reviews, ive heard it mentioned before too. I think im gonna see if i can loan it from the libary.

"Starting Out with C++: From Control Structures through Objects" seems right up my alley in terms of content. Thanks for the reccomendation, vmanes. Its rather expensive though, from amazon uk, (most computer books are 15-25 pounds, this is like 45)

commented: The books thread is 54 replies long, how much more opinion do you want? Also, "C++" is a completely useless thread title in a forum called "C++" -6
commented: A 54 reply-long book thread isn't very useful. +1

> The Complete Reference: C++ from Herb Schildt (1)
> C++ Black Book from Steven Holzner (2)

I'm not good in reviews, but I'll try to give some comments :):
(1) Herb explains everything very clearly and in an understandable way + very detailed explanations, very good examples used in the book and it covers the whole C++ syntax :) ...
(2) This book is also a good one but sometimes it becomes difficult to understand and are there too few examples to demonstrate such an advanced topic :) but to learn to basics it's just a great book, it also covers the whole C++ syntax in detail and might be especially very useful as a reference :) ...
(Both books are written by professional C++ programmers)

> Edit:: C++ Beginner's Guide is also a very nice one (you can get a free legal ebook copy here)

Sweet, but sadly im running Linux so i dont think i can view the XPS files.

>im running Linux so i dont think i can view the XPS files.

1. Look directly below the XPS downloads, and you'll see PDF downloads.
2. FYI: http://www.artifex.com/downloads/

Sweet, but sadly im running Linux so i dont think i can view the XPS files.

If you scroll the page a bit down you'll see there's also a PDF version of that ebook available :) ...

> Edit:: C++ Beginner's Guide is also a very nice one (you can get a free legal ebook copy here)

I bought that book before the age of 13, and was my first step to becoming the totally awesome programmer you see today :P

Okay ive had a bash at C++, but i have some errors (c++ pointers confuse me...)

#include <iostream>
#include <string>

using namespace std;

class ListNode
{
		public:
			ListNode(string newData);
			~ListNode();
			void setData(string newData);
			string getData();
			void setNext(ListNode nextNode);
			ListNode getNext();
		private:
				ListNode *next;
				string data;
};

ListNode::ListNode(string newData)
{
	next = NULL;
	data = newData;
}

ListNode::~ListNode()
{

}

void ListNode::setData(string newData)
{
		data = newData;
}

string ListNode::getData()
{
	return data;
}

void ListNode::setNext(ListNode nextNode)
{
		*next = nextNode;
}

ListNode ListNode::getNext()
{
		return *next;
}

class LinkedList
{
	public:
			LinkedList();
			~LinkedList();
			void setHead(ListNode newHead);
			ListNode getHead();
			void addNode(string data);
			void printList();
	private:
			ListNode *head;
};

LinkedList::LinkedList()
{
	head = NULL;
}

LinkedList::~LinkedList()
{

}

void LinkedList::setHead(ListNode newHead)
{
	*head = newHead;
}

ListNode LinkedList::getHead()
{
	return *head;
}

void LinkedList::addNode(string data)
{
	ListNode newNode(data);
	head.setNext(*newNode);	
}

void LinkedList::printList()
{
	ListNode currentNode = *head;
	do
	{
		cout << "Data: " << currentNode.getData();
		currentNode = currentNode.getNext();
	} 
	while(currentNode.getNext() != NULL);

}

int main()
{
	LinkedList myList;

	myList.addNode("test");
	myList.addNode("test2");
        myList.printList();
	return 0;
}

Its supposed to be a linked list btw. The addNode and printList methods are what is broken.

Okay ive had a bash at C++, but i have some errors (c++ pointers confuse me...)

...

Its supposed to be a linked list btw. The addNode and printList methods are what is broken.

Many of those errors are caused by things like illegal indirections and trying to assign values to members when there's no data allocated.

Remember that when you're trying to access members through a pointer, you have to use the -> operator, but that pointer has to have space allocated. For example, in this function:

void LinkedList::addNode(string data)
{
  ListNode newNode(data);
  head.setNext(*newNode); // if head is a pointer, then use the  ->  operator here
}

newNode is not a pointer, so you don't need the * there unless newNode is a valid pointer to a ListNode object.

It would take a while to go through the next 9 errors, so I recommend you revise pointers :icon_cheesygrin:

Hope that helps.

I bought that book before the age of 13, and was my first step to becoming the totally awesome programmer you see today :P

That's the evidence that it's a very good book :P !!

Okay, ive ordered a few books so i will reply when they arrive. Thanks for all your help.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.