I am extremely confused about libraries and have been having trouble understanding them with google. Basically I want to create a library so that I can use a bunch of functions from another file without all of the libraries' contents being seen. EG:
library code:
class test
{
private:
int num;
public:
test(int a):num(a){}
int num(){return a;}
};
header code:
class test
{
private:
int num;
public:
test(int a);
int num();
};
cpp file code:
#include "theheaderfile.h"
#include <iostream>
using namespace std;
int main()
{
test tst(5);
cout<<tst.num();
}
What kind of library should I use and how do I implement it on my cpp files? (I am using Code::Blocks IDE)