c++ compile fail with error: no member named 'snprintf' in namespace 'std' c++ compile fail with error: no member named 'snprintf' in namespace 'std' xcode xcode

c++ compile fail with error: no member named 'snprintf' in namespace 'std'


snprintf() comes from the C99 standard. You should not use namespace std for it. Just use the global namespace.

Don't forget to include stdio.h