Whenever I try to compile this code it always ends up with this error:
In file included from /usr/include/wchar.h:6:0, from /usr/lib/gcc/i68
In order to update it, follow below. If you are on Windows, just run these on command prompt or powershell
Update the package list: mingw-get update
mingw-get update
After updating the package list, run: mingw-get upgrade
mingw-get upgrade
Source: How to update GCC in MinGW on Windows?