In C++: structure is almost identical to class. There is only one difference between structure and class in C++ : data members in structure are by default public, and in class they are by default private.
sprintf will NOT cause memory leak if you will use it to convert regular C data types. No way. :)
If you already have some memory leak, try to find another source of that....
Leave a comment: