error: ‘memset’ was not declared in this scope in cpp

C++
C: #include <string.h>

C++: #include <cstring>

NOTE: inclusion of above headers works fine 
Source

Also in C++: