make build: builds dynamic library
make deb: builds source deb
make hack: combines library into cs50.h
make install: installs the library under /usr/local by default (set DESTDIR to change that)
$ sudo apt-add-repository ppa:cs50/ppa
$ sudo apt-get update
$ sudo apt-get install libcs50
- Download the latest release per https://github.com/cs50/libcs50/releases
- Extract
libcs50-*.* cd libcs50-*make install
Link with -lcs50.
#include <cs50.h>
...
char c = get_char();
double d = get_double();
float f = get_float();
int i = get_int();
long long ll = get_long_long();
string s = get_string();
See man get_* after installation, or CS50 Reference!
- Add tests.