![]() |
|
![]() |
|
|
Thread Tools | Display Modes |
|
|
#1 |
|
Programmer
Join Date: Apr 2005
Posts: 77
Rep Power: 4
![]() |
Organization of the standard library? (solved)
I am just curious how people navigate through the standard library to find the functions they want when it is so big. Is there any rhyme or reason to the way it is organized, or a way of viewing it taxonomically?
Last edited by Josef_Stalin; Apr 19th, 2005 at 12:05 PM. |
|
|
|
|
|
#2 |
|
Programmer
Join Date: Mar 2005
Location: Lexington, Ky
Posts: 58
Rep Power: 4
![]() |
Usually, they just look at what library the functions they are looking for are located from a book or other sources. We, don't usually memorize it because its too much, but some standard functions are worth memorizing because we use it a lot, or eventually we get to memorize it anyway. http://www.cplusplus.com is a nice web you can visit to see which functions are located where.
|
|
|
|
|
|
#3 |
|
Hobbyist Programmer
|
Pick up O'Reilly's "STL Pocket Reference"
It's pretty handy, and a steal for 9.95 +S&H ![]() http://www.oreilly.com/catalog/stlpr/ (Yes, i know i push O'Reilly products all the time. No, i do not work for O'Reilly. But i wish i did ) |
|
|
|
|
|
#4 |
|
Professional Programmer
Join Date: Nov 2004
Posts: 250
Rep Power: 4
![]() |
Rather than try to memorize everything, simply check a good reference when you find yourself hand writing code to do a common operation. Chances are good that the standard library already does it for you. www.dinkumware.com is a good reference.
|
|
|
|
|
|
#5 |
|
Programmer
Join Date: Apr 2005
Posts: 77
Rep Power: 4
![]() |
So what I'm getting here is that there is no way to break it down like for instance you can organize a list of cars. Like you have pics-ups, and suvs, and all different types which are organized based on similarities. There is no system of true organization here, you just have to have a reference?
Last edited by Josef_Stalin; Apr 19th, 2005 at 12:12 AM. |
|
|
|
|
|
#6 |
|
Professional Programmer
|
Well, they are organized... you have Vectors, Lists, Strings, Maps, etc. They all have functions, many interchangeable, that can be used on them. They're all separated and organized into different headers for each datatype (ie vector.h or string.h) or code block. That sounds like it's about the same thing to me, no?
BTW, like BaroN NighT said, http://www.cplusplus.com/ is a great resource. Everything is broken up there.
__________________
% rc4 hexkey < input > output
#define S ,t=s[i],s[i]=s[j],s[j]=t /* rc4 hexkey <file */
unsigned char k[256],s[256],i,j,t;main(c,v,e)char**v;{++v;while(++i)s[
i]=i;for(c=0;*(*v)++;k[c++]=e)sscanf((*v)++-1,"%2x",&e);while(j+=s[i]
+k[i%c]S,++i);for(j=0;c=~getchar();putchar(~c^s[t+=s[i]]))j+=s[++i]S;} |
|
|
|
|
|
#7 |
|
Programmer
Join Date: Apr 2005
Posts: 77
Rep Power: 4
![]() |
Thanks. Yeah, you are right. I am rusty and I'm just looking over code and things seem complicated.
|
|
|
|
![]() |
| Bookmarks |
| Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
| Thread Tools | |
| Display Modes | |
|
|