![]() |
|
![]() |
|
|
Thread Tools | Display Modes |
|
|
#1 |
|
Hobbyist Programmer
Join Date: May 2005
Location: ma
Posts: 130
Rep Power: 4
![]() |
essential C/C++ libraries to know?
I am attempting to learn C and C++. I don't want to just get comfortable with it but be able to say im proficient in them. I wanted to know what libraries are a must to learn in able to say you've "mastered" the language. thanks in advance.
jeff |
|
|
|
|
|
#2 |
|
Professional Programmer
|
I would say stdio (or iostream), stdlib, time, and maybe math, as well as the STL (notably string and vector). That's the most useful part of the basic language, for me.
To "master" the language, though, you'd have to learn all of them ![]()
__________________
% 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;} |
|
|
|
|
|
#3 |
|
I eat cake for breakfast.
![]() ![]() ![]() ![]() Join Date: Jul 2004
Location: In my box.
Posts: 4,434
Rep Power: 9
![]() |
I would add file.h, dir.h and fstream to those.
|
|
|
|
|
|
#4 |
|
Expert Programmer
Join Date: Dec 2004
Posts: 794
Rep Power: 4
![]() |
I vote for std::map and std::deque in addition to the ones already mentioned. Don't bother with stdio.h, file.h, etc. if you're using C++.
IMO, don't bother with std::stack or std::queue. If there is a use for them, I haven't found it yet. |
|
|
|
|
|
#5 |
|
Programmer
|
Depends on what kind of programs you want to make. iostream.h will most likely be essential, fstream.h comes in handy for file i/o, and looking into stdlib.h wouldn't hurt.
winsock is useful for (as the name might give away) socket programming. This could by used to make port scanners, packet sniffers, and the like.. like I said though, it depends on what you're into. |
|
|
|
|
|
#6 |
|
Expert Programmer
Join Date: Dec 2004
Posts: 794
Rep Power: 4
![]() |
by the way, for C++ standard library headers you should use <iostream> instead of <iostream.h>, <fstream> instead of <fstream.h>, etc. For C standard library headers, use <cstdlib> instead of <stdlib.h>, <ctime>, <cstdlib>, etc.
|
|
|
|
|
|
#7 |
|
Programming Guru
![]() ![]() ![]() |
iostream, fstream, stdlib, math, string, vector, etc. The standard template library would make your life easier... learn the libraries or at least how to use them if they deal with data or file structures.
if you are in the unix world and writing C code... learn these... (taken from a program I wrote this morning) #include <stdio.h> #include <signal.h> #include <ctype.h> #include <sys/types.h> #include <sys/timeb.h> #include <time.h> #include <sys/socket.h> #include <netinet/in.h> #include <arpa/inet.h> #include <netdb.h> #include <sys/stat.h> #include <unistd.h> #include <syslog.h> #include <sec/des.h>
__________________
http://jasonpowers.net "There are a thousand hacking at the branches of evil to one who is striking at the root." |
|
|
|
![]() |
| Bookmarks |
| Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
| Thread Tools | |
| Display Modes | |
|
|