in reply to Assigning printf to a variable
Hello viffer,
If I understand your question correctly, you just need to substitute sprintf for printf. :-)
Hope that helps,