Confused when trying to research about the use of snprintf in C++. I see some online recommends the use of snprintf over sprintf as below.
snprintf(str, sizeo