foo.cpp: In function 'int main()':
foo.cpp:10:29: error: 'memset' was not declared in this scope
memset(nam,0,sizeof(nam));
^
foo.cpp:41:34: error: cannot pass objects of non-trivially-copyable type 'std::string {aka class std::basic_string<char>}' through '...'
printf("%s\n%d\n%d\n", nam[ma], num[ma], mb);
^
foo.cpp:41:48: warning: format '%s' expects argument of type 'char*', but argument 2 has type 'std::string {aka std::basic_string<char>}' [-Wformat=]
printf("%s\n%d\n%d\n", nam[ma], num[ma], mb);
^