error: ‘memset’ was not declared in this scope By Cătălin George Feștilă | 17/01/2012 0 CommentIf you receive: error: ‘memset’ was not declared in this scope main.cpp:394: error: 'memset' was not declared in this scope 1 main.cpp:394: error: 'memset' was not declared in this scope Fix it by including: #include <cstring> in the source of C++file. If you use C then use : #include <string.h> .