snprintf() comes from the C99 standard. You should not use namespace std for it. Just use the global namespace.
snprintf()
C99
std
Don't forget to include stdio.h
stdio.h