I want to dig deeper into C++

CrazYmonkeY159

Expert Member
Joined
Sep 13, 2007
Messages
2,142
Reaction score
0
Location
CPT/PE
So I have a couple of questions

lets say for example I want to find out how string::find() works in C++ what should I do? I dont mean trying to find out how to use it and what its used for, I mean if I want to find out how string::find() is implemented (in code) where can I find that out?

Also where can I found the header files for various classes (like math.h or algorithm)

If I am without internet and ive forgotten how to insert items into a vector what can I do?

Using Linux.

tl;dr, how can i "see" various implementations of methods/classes in c++ and is there documentation for c++ (like man pages). if so where can i find it.
 
I would look into getting something like http://www.amazon.com/Programming-Language-3rd-Bjarne-Stroustrup/dp/0201889544

In linux, you usually have an /usr/include directory where all your header files would be stored.

Maybe some other people have better answers -- but you can't go much wrong finding anything about Bjarne if you are interested in C/C++

It sounds a bit like you are more interested in the STL than C++ specifically. Keep in mind that the STL is a standard, and you will find different implementations of it.

For example: gcc might implement string::find() and Vector very differently from how MS would.
 
Last edited:
I'm on Windows, so not sure if its the same, but I usually right click on a function and say "Find Definition" (VS 2010 Express). Usually jumps to the file its located in.
 
If your using visual studio 2010 and .net just double click on any of your references to see the associated code but note that it will probably be written in cil.
 
If using Visual Studio

Place the caret on the header file and Press CTRL-SHIFT-G (if so configured)
(or just right click and select Open Document....)

MSDN documentation used to be free for download (not sure if it is anymore), so you can just download all the docs.
 
Ive alreaddy got some C++ books. I dont feel like lugging them around everywhere I go, Im in a Linux Environment so VS tips dont do me much justice ;P

I usually find myself coding on different machines (at varsity, home, friends etc) would be cool thanks biena i think thats what im looking for,
 
I've just spent 2 days trying to get a library working, so I don't want to go any deeper :'(
 
Top
Sign up to the MyBroadband newsletter
X