[quote]Since I have so many C++ questions, I have tried many different C++ books. All seem to have a different way of writing constructors, defining namespace, etc.
What resource would be consulted to help a ROOT developer with a question?
I can’t afford five books, but can one.[/quote]
… I decided to modify my answer …
For styding C++ I would recommend one of Bjarne’s nice books:
-
www2.research.att.com/~bs/programming.html (Anar already mentioned)
Good for complete beginner, but IMHO it requires a lot of work from you - I guess, it’s written in a way how Bjarne teaches his students. So, you have to work as a student, read it carefully, regularly, step by step, do excercises etc - if you start skipping simple things you know already, you can skip something important - the book is huge.
- www2.research.att.com/~bs/3rd.html
I think this book is intermediate step between the C++ textbook and C++ standard. So, if you are not able to find any answer here, you can find it in C++ standard text.
I think, Bjarne’s books are arguably the best texbooks - at least Bjarne can not give you a bad advice about C++ (except typos, errors etc.
) Sure, this is only IMHO, I know a real C++ expert, who thinks, there are no good books on C++ at all.
There are a lot of other popular books on C++.
Books by Scott Meyers and Herb Sutter are mainly discussing
traps and subtle areas of C++, they are good, but they are not a textbooks on C++, they can be only a complement to a good textbook on C++.
AFAIK most of Sutter’s books are available online, as GOTW (Guru of the week) small q/a’s: gotw.ca/gotw/
Books:
amazon.com/Effective-Specifi … 466&sr=8-6
amazon.com/Exceptional-Engin … 556&sr=8-2
amazon.com/More-Exceptional- … 556&sr=8-4
There is a good book on C++ templates by N. Josuttis and D. Vandevoorde
(if one day you want to better understand templates):
amazon.com/Templates-Complet … 025&sr=8-4
There is a good book on C++ standard library by N. Josuttis.
amazon.com/Standard-Library- … 025&sr=8-2
Etc.etc. - just go to accu.org and select “book reviews”. That place is definitely better to select C++ book, than ROOT’s forum:
accu.org/index.php?module=bookre … unc=search
Search books on C++ and read reviews, which has “Highly recommended” mark.
And sooner or later it’s good to look at C++ standard - not a big pleasure to read, but has answers to all your C++ questions (though reading can easily produce more questions without answers
)). You can download draft for free.
open-std.org/jtc1/sc22/wg21/
For ROOT - read ROOT user’s guide.
And yes, if you have a question and you cannot find answer - the best way is to register at some C++ forum and ask people. Just find a good place - where answers will be most probably correct: comp.lang.c++ or comp.lang.c++.moderated. Btw, they must have good FAQ - something like this (?)
parashift.com/c+±faq-lite/
Good luck!