GTK+ library installation

I was trying to program a graphical iterface using GTK+ by following the video below.

However I didnt have the <gtk/gtk.h> library installed in my linux computer. So I tried to download it by going to and downloading the source files but had no luck. Kept getting the same error saying
fatal error: gtk/gtk.h: No such file or directory
Then I tried to configure it but kept getting errors like
error: Package requirements (glib-2.0 >= 2.33.1 atk >= 2.5.3 pango >= 1.30.0 cairo >= 1.10.0 cairo-gobject >= 1.10.0 gdk-pixbuf-2.0 >= 2.26.0) were not met:

This was such a pain until I ran into the video below. The guy speaking you’ll not understand shit but he showed step by step

Here are the steps:
In command line:
$ sudo apt-get install libgtk2.0-dev

c++ sample code:

#include <gtk/gtk.h>
int main(int argc, char *argv[]){
    GtkWidget* window;
    window = gtk_window_new(GTK_WINDOW_TOPLEVEL);
    return 0;

compile the program:

$ g++ test.cpp `pkg-config --libs gtk+-2.0` `pkg-config gtk+-2.0 --cflags`

run the program:
$ ./a.out