Added C++ string formatter to replace sprintf