Learning C++ Templates [closed] - c++

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
Questions asking us to recommend or find a tool, library or favorite off-site resource are off-topic for Stack Overflow as they tend to attract opinionated answers and spam. Instead, describe the problem and what has been done so far to solve it.
Closed 8 years ago.
Improve this question
Can anyone recommend any good resources for learning C++ Templates?
Many thanks.

I've found cplusplus.com to be helpful on numerous occasions. Looks like they've got a pretty good intro to templates.
If its an actual book you're looking for, Effective C++ is a classic with a great section on templates.

I recomned that you get C++ Templates - The Complete Guide it's an excellent resource and reference.

This is a more advanced, but very useful, book on templates and template use.
Modern C++ Design

Bruce Eckel's Thinking in C++ is how I learned about templates. The first volume has an introductory chapter and the second volume has an in-depth chapter on templates.
There's Bjarne Stroustrop's The C++ Programming Language which has a good chapter on them. And The C++ Standard Library: A Tutorial and Reference which is about the standard library, but would definitely help you get a better understanding of how templates could be used in the real world. .

Be sure to differentiate between generic programming and template metaprogramming (which is more like another paradigm)
Generic programming can be learnt from the C++ bible, but you can just as well take a look at the java generics etc...
one about metaprogramming: Josuttis' book C++ Templates: The Complete Guide

The 2 volumes of 'Thinking in C++' go over the basics of templates. They can either be bought in print, or downloaded for free (and legal) use here.

"The C++ Programming language" by Bjarne Stroustrop

Related

Websites rich with exercices or explanation for SML? [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
Questions asking us to recommend or find a tool, library or favorite off-site resource are off-topic for Stack Overflow as they tend to attract opinionated answers and spam. Instead, describe the problem and what has been done so far to solve it.
Closed 9 years ago.
Improve this question
I know that I need to pass through google to search etc, I did but they don't offer what I need 90% of this sites give the same example and even sometimes the same explanation, If there someone who have for example links from university or school or may be in his dropbox, I will be very thankfull.
Unfortunately it seems that the best resources for learning Standard ML are various paper books (e.g. Introduction to Programming using SML by Hansen & Rischel, ML for the Working Programmer by Larry C. Paulson, or Programming in Standard ML by Robert Harper (the last one is available for free online), as well as resource material from various university courses of which none I have encountered excels.
Here is a number of exam assignments from one course using Standard ML:
I took the Programming Languages Course at Coursera and it was superb. Most of the course is based on SML.
The first first four weeks are entirely about SML. The material distributed in the course is great and every week there are plenty of interesting exercises to solve.
The good news is that this course is about to start in October 3, 2013 again. So this is your opportunity.
I own the list of books mentioned in the other answer. They all are very good. But I also own another one not mentioned above and that I considered great for initial ML learning: Elements of ML Programming by Jeffrey Ulman. In fact I preferred this to the others mentioned above because I found its explanations simpler and the exercises more progressively challenging.
I am using the book Programming in Standard ML by Colin Meyers,Chris Clark,Ellen Poon
and ML for the working Programmer by L C Paulson.The former is really a great book as it always puts types in function declarations..this way you will master the underlying types in sml

C++: Where is a good place for sample C++ codes to be used by a teacher? [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
Questions asking us to recommend or find a tool, library or favorite off-site resource are off-topic for Stack Overflow as they tend to attract opinionated answers and spam. Instead, describe the problem and what has been done so far to solve it.
Closed 9 years ago.
Improve this question
I am a teacher of programming. For the C++ course, I need a good reference to provide educational example problems and their solutions. I know some popular problems but I like to see them all in a one place and choose between them.
Do you know some website to achieve this?
Accelerated C++ is your best bet.
editorializing note: I've gone through an enormous amount of intro C++ books. There is so much drek out there, it's mind-blowing. I think Accelerated C++ is pretty concise and lucid.
It has the disadvantage of being short, so it can't be used as monitor-lifting fodder.
I didn't know about it at the time and I went through piles of other books. Jesse Liberty's C++ in 24 hours was the most useful of the books I found when I was learning. Looking back on it, that's sort of surprising, given the X in Y hours reputation.
Trying to keep the line of a book, it's a great idea since, you all the examples will have the same line of, let's say logic. A great book, that help me out was written by H. M. Deitel, it has several programming books, and in my point o view, are very well explained.
You can't find better questions/examples targeted on understanding of C++ (including advanced) topics than Herb Sutter's Guru of the Week series (http://gotw.ca/publications/index.htm)

i need a good website to learn c++ [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
Questions asking us to recommend or find a tool, library or favorite off-site resource are off-topic for Stack Overflow as they tend to attract opinionated answers and spam. Instead, describe the problem and what has been done so far to solve it.
Closed 9 years ago.
Improve this question
i want to learn C++; and i already have a compiler.
i already know a few programming languages including:
BASIC (yes, the dos version)
visualBasic (using VisualBasic Express
2006 or 8 i'm not quite sure)
Java
PHP
HTML (if we count that)
so it doesn't need to be for absolute beginners; although if you find one post it too.
www.cplusplus.com is a great website with tons of documentation for experts and beginners.
Tutorials for beginners:
http://www.cplusplus.com/doc/tutorial/
An additional website I heartily reccomend once you have a little more expertise is the C++ FAQ Lite.
The text of a good book is online here: Thinking in C++
G'day,
I know it isn't a website but I'd highly recommend working through the excellent book Accelerated C++ (sanitised Amazon link) by Andy Koenig and Barbara Moo.
It'll start you off properly by approaching C++ as it's own language rather than C with OO bits "bolted on". And you get to work with STL right from the start.
Highly recommended.
HTH
cheers,
It's not a tutorial per-se but the C++ FAQ LITE is an invaluable resource IMHO.
I would like to highlight a website for C++ programming.
Learn C++ Online - www.learncpponline.com
The above website is still not completely updated I think. But this website helped me a lot in my studies. Hope it will be helpful for others as well
Aprt from the useful links given by #Doug T. You can have a look at the advanced puzzles of c++ # http://www.gotw.ca/gotw/ ( of course after the basics)
I second Rob Wells; "Accelerated C++" is an excellent book. It would be hard to do better.
I would like to add that pointers can be especially daunting coming from your background. One of the best explanations I have come across is here at the Stanford CS web site. They have several pdfs and even an animated video on the subject.

Learning C++ Language [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
Questions asking us to recommend or find a tool, library or favorite off-site resource are off-topic for Stack Overflow as they tend to attract opinionated answers and spam. Instead, describe the problem and what has been done so far to solve it.
Closed 9 years ago.
Improve this question
I am a .net c# programmer but I want to learn .NET C++ also. I am a beginner for c++. Is there any site, book, or Video Tutorials from beginner to expert?
There's no such thing as ".Net c++".
Maybe you mean C++/CLI, which is Microsoft's language specification intended to supersede Managed Extensions for C++ (See Wikipedia). Managed extensions to C++ are its inferior and now defunct ancestor [thanks #dp for your comment].
Bear in mind when you choose your learning material that C++/CLI is not equal to the (standard) C++ programming language; so if you want to learn the former, you should edit the question title and tags.
(Note: This is not to be nitpicky, but to help. I think getting the right idea for each name, and the right name for each concept, is an important factor for consistent learning. And of course it's especially important if you search for information on the web.)
I'd suggest starting with Bruce Eckel's Thinking in C++ for a start.
It's already around for some time (latest version 2003) but it provides a good path from beginner to the more advanced techniques and interiors of C++. It has also some OO foundations in case you like to want to know more about that basics.
(Master download site for the book)
cprogramming.com
cplusplus.com
For a beginner I think a good starting place is C++ Primer. From there I'd recommend Scott Meyers' Effective C++ books.
Certainly this has been asked before, I just can't find the duplicate.
http://www.amazon.co.uk/Accelerated-Practical-Programming-Example-Depth/dp/020170353X/ref=sr_1_4?ie=UTF8&s=books&qid=1235080299&sr=1-4
is great for c++, you'll know the .net from your c#
The biggest tip: in C# you'd do everything with classes, and in C++, you do anything to do with the Win32 API with function calls.
google.com and msdn.microsoft.com are your friends.
Never give up. C++ is much more time-consuming to write, and it's easier to make mistakes.
As you are writing your programs, look for small examples that do small pieces of what you want to achieve, and study them.

Suggestion for template book for C++? [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
We don’t allow questions seeking recommendations for books, tools, software libraries, and more. You can edit the question so it can be answered with facts and citations.
Closed 6 years ago.
Improve this question
I am learning templates. Which book is worth buying for doing template programming?
I already have The C++ Programming Language and Effective C++.
Those two books are pretty good in my opinion and they helped me a lot
C++ Templates: The Complete Guide by David Vandevoorde and Nicolai M.
Josuttis
Modern C++ Design by Andrei Alexandrescu
The first one explains how templates work. The second book is more about how to use them. I recommend you to read the first book before starting with Modern C++ Design because that's heavy stuff.
Maybe a bit mind-boggling if you are just learning, but after the books you mention, you may want to read Andrei Alexandrescu's Modern C++ Design, if only to learn what can be accomplished through templates. Besides, it discusses many advanced aspects of templates wonderfully.
Search for fairly recent book "Advanced C++ Metaprogramming" by Davide Di Gennaro
Both Modern C++ design and C++ Template Metaprogramming are very good (and quite advanced) books on the subject. I have a strong personal preference for the first.
C++ Templates: The Complete Guide is your best bet. You could also learn about the Standard Library which heavily uses templates.
There is a hidden treasure in C++ templates that very few people are aware of: C++ Common Knowledge: Essential Intermediate Programming.
The last 15 chapters of that book both teaches better and complements C++ Template Metaprogramming in some respects. I strongly recommend anyone who is to learn templates to read this book foremost.
"C++ Templates: The Complete Guide (Vandevoorde & Josuttis)" is excellent for the theory.
Then you can learn even more about actual templating practice by looking at how templates are used in the Boost library.
Effective STL by Scott Meyers