   Libraries?
  HelloI am very new to programming but am trying C++, I might change to something like C# though after reading the topic about C++ being overused in amateur developement, but thats kind of off the point.I've been looking around and seen alot about Libraries, which I know nothing about so can you please answer these questions:1. What is a library?2. Will I need to use a Library?3. Can I make my own Library?4. How would I make my own?5. Why would I need to make my own?I'm sorry if these questions seem obvious to you (thats why this is in the beginners forum, not the library forum), but could you please answer them.   
  1 - A library is a package of premade, and often pre-compiled code that you use so you don't have to re-write that code.2 - No need, though it would be foolhardy to not use the C++ Standard Library, Boost, or other libraries to help you.3 - Sure.4 - That depends on your development environment.5 - Once again you don't need to, but you would to help orginize your code or to help end-users by creating 1 common library 2 of your apps could use rather than duplicating that code in the two apps. If you're just starting out, I would recommend that you focus on learning other Libraries.   ;  This is probably over-simplifying, but then is a library just a file with a collection of pre-made functions in it?   ;  1. A library is a collection of routines, ready to use.2. You need to use libraries (see below).3. - 5. Sure, you can make your own libraries, but I think that topic is too advanced at the beginning of learning C++. There are some things to be considered especially for building a library that could not be understood w/o having knowledge on the language itself.E.g. if your application uses a mathematical function like sin, sqrt, and so on, you usually use the math library. If you want to use Direct3D or OpenGL, you need the D3D or OpenGL libraries, resp. Nearly each and every C/C++ program uses some functions from the C library, and also for C++ a special library (stdc++) exists. There are plenty of libs around to make your life as programmer easier, since you don't have to implement all the stuff by yourself.A library is a file with functions but also the possibility to search for the functions (say there are "symbols" what denote a kind of name for functions), so that an application could invoke those functions it needs.   ;Quote:Original post by Peter ConnThis is probably over-simplifying, but then is a library just a file with a collection of pre-made functions in it?Pretty much.  I have a group of classes that form a code base for OpenGL window drawing and texturing etc... among other OpenGL stuff.  I call it a library, though others may not.  It has the helper functions though.  I use it to re-use my code, which is what libraries are really for.  The boost library as well the C++ standard stuff linked to above are good examples.  Why recreate a vector object on your own if you just want to use it???  Unless you do so for learning purposes, there is no need to create your own since there are very fast available libraries for free that already did the work for you.   